Esempio n. 1
0
    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);
    }
Esempio n. 2
0
    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);
 }