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(); } }
private void _Deactivate() { IsActive = false; IsSelected = false; SpawnVersion++; if (onDeactivation.IsNotNull()) { onDeactivation(this); } abilityManager.Deactivate(); Body.Deactivate(); if (Influencer.IsNotNull()) { Influencer.Deactivate(); } if (StatsBarer != null) { StatsBarer.Deactivate(); } if (Ringer.IsNotNull()) { Ringer.Deactivate(); } }
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 Simulate() { if (Influencer.IsNotNull()) { Influencer.Simulate(); } abilityManager.Simulate(); if (IsCasting == false) { SetState(AnimState.Idling); } }
private void _Deactivate() { IsActive = false; IsSelected = false; SpawnVersion++; abilityManager.Deactivate(); Body.Deactivate(); if (Influencer.IsNotNull()) { Influencer.Deactivate(); } }
private void _Deactivate() { this.StopCast(); IsSelected = false; abilityManager.Deactivate(); Body.Deactivate(); if (Influencer.IsNotNull()) { Influencer.Deactivate(); } SpawnVersion++; IsActive = false; }
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; } }
public virtual void Simulate() { if (!_provisioned) { _provisioned = true; _cachedCommander.CachedResourceManager.AddResource(ResourceType.Provision, resourceCost[ResourceType.Provision]); } if (Influencer.IsNotNull()) { Influencer.Simulate(); } abilityManager.Simulate(); if (Animator.IsNotNull() && IsCasting == false) { Animator.SetIdleState(); } }