public virtual void Awake() { if (CheckErrors() == true) { return; } if (receivingObject) { platformScript = receivingObject.GetComponent <MF_AbstractPlatform>(); navScript = receivingObject.GetComponent <MF_AbstractNavigation>(); receivingControllerScript = receivingObject.GetComponent <MF_AbstractPlatformControl>(); } if (dontAddToSelectScript == false) { MF_AbstractSelection selScript = transform.root.GetComponent <MF_AbstractSelection>(); if (selScript) { MF_AbstractTargeting[] temp = new MF_AbstractTargeting[selScript.otherTargScripts.Length + 1]; for (int i = 0; i < selScript.otherTargScripts.Length; i++) { temp[i] = selScript.otherTargScripts[i]; } temp[selScript.otherTargScripts.Length] = this; selScript.otherTargScripts = temp; } } }
public virtual void Start() { if (CheckErrors() == true) { return; } if (receivingObject) { platformScript = receivingObject.GetComponent <MF_AbstractPlatform>(); navScript = receivingObject.GetComponent <MF_AbstractNavigation>(); receivingControllerScript = receivingObject.GetComponent <MF_AbstractPlatformControl>(); } }