public void Initialize( Vector2d position = default(Vector2d), Vector2d rotation = default(Vector2d)) { IsActive = true; CheckCasting = true; CachedGameObject.SetActive(true); if (Body.IsNotNull()) { Body.Initialize(position.ToVector3d(), rotation); } if (Influencer.IsNotNull()) { Influencer.Initialize(); } abilityManager.Initialize(); if (Animator.IsNotNull()) { Animator.Initialize(); } }
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 Initialize( Vector2d position = default(Vector2d), Vector2d rotation = default(Vector2d)) { IsActive = true; CheckCasting = true; CachedGameObject.SetActiveIfNot(true); if (Body.IsNotNull()) { Body.Initialize(new Vector2dHeight(position), rotation); } if (Triggers.IsNotNull()) { foreach (LSTrigger trigger in Triggers) { trigger.Initialize(); } } if (Influencer.IsNotNull()) { Influencer.Initialize(); } abilityManager.Initialize(); if (Animator.IsNotNull()) { Animator.Initialize(); } }
public void Initialize( AgentController controller, ushort localID, ushort globalID, Vector2d position = default(Vector2d), Vector2d rotation = default(Vector2d)) { LocalID = localID; GlobalID = globalID; Controller = controller; IsActive = true; CheckCasting = true; Selectable = true; CachedGameObject.SetActiveIfNot(true); if (Body.IsNotNull()) { Body.Initialize(new Vector2dHeight(position), rotation); } if (Triggers.IsNotNull()) { foreach (LSTrigger trigger in Triggers) { trigger.Initialize(); } } if (Influencer.IsNotNull()) { Influencer.Initialize(); } if (Animator.IsNotNull()) { Animator.Initialize(); } abilityManager.Initialize(); if (StatsBarer != null) { StatsBarer.Initialize(); } if (Ringer.IsNotNull()) { Ringer.Initialize(); IsSelected = false; IsHighlighted = false; } if (onInitialized != null) { onInitialized(this); } }
public void Initialize( AgentController controller, ushort localID, ushort globalID, Vector2d position = default(Vector2d)) { LocalID = localID; GlobalID = globalID; Controller = controller; IsActive = true; CheckCasting = true; Selectable = true; CachedGameObject.SetActive(true); if (Body.IsNotNull()) { Body.Initialize(position, Vector2d.up); } if (Influencer.IsNotNull()) { Influencer.Initialize(); } if (Animator.IsNotNull()) { Animator.Initialize(); } abilityManager.Initialize(); if (StatsBarer != null) { StatsBarer.Initialize(); } if (Ringer.IsNotNull()) { Ringer.Initialize(); IsSelected = false; IsHighlighted = false; } }