Пример #1
0
    void Start()
    {
        // Projectile will have "(Clone)" added to the name as it was instatiated after a template GO
        string correctName = name.Replace("(Clone)", "");

        speed = AbilityDataCache.GetProjectileSpeed(correctName);
    }
    void OnEnable()
    {
        // Projectile will have "(Clone)" added to the name as it was instatiated after a template GO
        string correctName = name.Replace("(Clone)", "");

        speed = AbilityDataCache.GetProjectileSpeed(correctName);
        Debug.Log("MoveAbilityToPoint speed for " + name + " is " + speed);

        moveDirection   = Utils.Instance.GetMousePosition() - transform.position;
        moveDirection.z = 0;
        moveDirection.Normalize();

        endPosition = Utils.Instance.GetMousePosition();
    }