コード例 #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);
    }
コード例 #2
0
    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();
    }