public void FireCreate() { animationUtil obj = Instantiate(fire, effectPos.position, Quaternion.identity); var vec = fireVector; vec.x *= Mathf.Sign(-transform.localScale.x); obj.SetVelocity(vec); obj.SetDedLength(fireLength); }
void ShotCreat(animationUtil target) { animationUtil obj = Instantiate(target, effectPosition.position, Quaternion.identity); var vec = fireVector; vec.x *= Mathf.Sign(-transform.localScale.x); obj.SetVelocity(vec); obj.SetDedLength(fireLength); }
private void Start() { rb = GetComponent <Rigidbody2D>(); myUtil.SetVelocity(firstSpeed); }