public override void SetTarget(GameObject target) { if (target == null) { PUtil.LogError("Invalid target specified"); } else { engine = target.GetComponent <StirlingEngine>(); RebuildPanel(); } }
// MONOBEHAVIOUR void Awake() { engine = this.GetComponent <StirlingEngine>(); rbody = this.GetComponent <Rigidbody>(); }
// Use this for initialization void Start() { rbody = this.GetComponent <Rigidbody>(); engine = this.GetComponent <StirlingEngine>(); }
public override void ClearTarget() { engine = null; }