Ejemplo n.º 1
0
    public override void Initialize()
    {
        base.Initialize();
        sGroup.sortingOrder = (int)(TargetPosition.y * -100);
        stop = false;

        if (FromFront)
        {
            gun.transform.rotation = Quaternion.Euler(frontRotation);
        }
        else
        {
            gun.transform.rotation = Quaternion.Euler(backRotation);
        }

        gun.ResetCooldown();
        MovingDirection = (TargetPosition - transform.position).normalized;
    }