Commit 2f7f0143 authored by 18류지석's avatar 18류지석

활 위로쏨. 필요없는 스크립트 삭제. 화살 ddd 하는거 수정

parent ffeab171
......@@ -26,7 +26,6 @@ GameObject:
- component: {fileID: 114906702720267008}
- component: {fileID: 95992411616135034}
- component: {fileID: 114880704145925944}
- component: {fileID: 114277433455505312}
- component: {fileID: 82529156342294766}
m_Layer: 0
m_Name: Player
......@@ -291,17 +290,6 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!114 &114277433455505312
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1623439448163086}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: df26c325b370e6a4bb7a589984854376, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &114294925164316638
MonoBehaviour:
m_ObjectHideFlags: 1
......
......@@ -60,7 +60,7 @@ Rigidbody2D:
m_AngularDrag: 0
m_GravityScale: 0
m_Material: {fileID: 0}
m_Interpolate: 0
m_Interpolate: 1
m_SleepingMode: 1
m_CollisionDetection: 1
m_Constraints: 4
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ProjectileGenerator : MonoBehaviour {
public GameObject InstantiateProjectile(GameObject obj, Vector3 pos, Quaternion rot)
{
return Instantiate(obj, pos, rot);
}
}
fileFormatVersion: 2
guid: df26c325b370e6a4bb7a589984854376
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -38,5 +38,14 @@ public class Bow : Item {
tmpObj.transform.localScale = new Vector3(Mathf.Sign(player.transform.localScale.x), 1, 1);
tmpObj.GetComponent<Rigidbody2D>().velocity = new Vector2(-10f * Mathf.Sign(player.transform.localScale.x), 0f);
}
protected override void PlaySkill2()
{
player.GetComponent<Player>().StartCoroutine(Shoot2());
}
IEnumerator Shoot2()
{
yield return new WaitForSeconds(0.3f);
GameObject tmpObj = Object.Instantiate(arrow, player.transform.position, Quaternion.Euler(0, 0, -90f));
tmpObj.GetComponent<Rigidbody2D>().velocity = new Vector2(0f,10f);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment