// Use this for initialization void Start () { behavior = gameObject.FindBehavior (); // --- InvokeRepeating ("EveryPeriod", 0f, 0.33f); }
void Start () { behavior = gameObject.GetBehavior (); }
public UnitInfo (GameObject un) { unit = un; behavior = un.GetComponent<UnitBehavior> (); }
//protected float timer = 0f; public virtual void Start () { behavior = gameObject.FindBehavior (); InvokeRepeating ("EveryPeriod", 0f, period); }
// Use this for initialization protected virtual void Start () { behavior = gameObject.GetBehavior (); // --- }
public void ClearTarget () { if (target != null) { targetBehavior.state.OnDeath -= OnTargetDeath; target = null; targetBehavior = null; } }
public void SetTarget (GameObject newTarget) { UnitBehavior otherBehavior = newTarget.GetBehavior (); if (otherBehavior != null) { if (!otherBehavior.state.isAlive) return; if (target != null) { ClearTarget (); } target = newTarget; targetBehavior = otherBehavior; otherBehavior.state.OnDeath += OnTargetDeath; } }
void Start () { behavior = gameObject.FindBehavior (); // --- transform.parent = new_parent; }
void Start () { behavior = gameObject.FindBehavior (); // --- InvokeRepeating ("OverlapSphere", 0f, period); }
// Use this for initialization protected virtual void Start () { behavior = gameObject.FindBehavior (); // --- InvokeRepeating ("EveryPeriod", 0f, period); }