Ejemplo n.º 1
0
        public virtual void Initialize(
            Vector2d position = default(Vector2d),
            Vector2d rotation = default(Vector2d))
        {
            IsActive     = true;
            CheckCasting = true;

            // put game object under it's agent commander
            CachedGameObject.transform.parent = this.Controller.Commander.GetComponentInChildren <RTSAgents>().transform;

            CachedGameObject.SetActive(true);
            if (Body.IsNotNull())
            {
                Body.Initialize(position.ToVector3d(), rotation);
            }

            if (Influencer.IsNotNull())
            {
                Influencer.Initialize();
            }

            abilityManager.Initialize();
            if (Animator.IsNotNull())
            {
                Animator.Initialize();
            }
        }
 public void InitializeTimed(Vector2d forward)
 {
     Forward   = forward;
     Direction = forward.ToVector3d();
 }