public override void InitializeAgent() { base.InitializeAgent(); academy = GameObject.Find("NNLandingAcademy").GetComponent <NNLandingAcademy>(); rb = this.GetComponent <Rigidbody2D>(); shipController = this.GetComponent <Nave>(); platform = this.transform.parent.Find("Base").gameObject; gameManager = this.transform.parent.Find("GameManager").GetComponent <GameManager>(); }
void Start() { nave = this.transform.parent.Find("Nave").gameObject; winObj = GameObject.Find("UI").transform.Find("Win").gameObject; looseObj = GameObject.Find("UI").transform.Find("Loose").gameObject; naveRB = nave.GetComponent <Rigidbody2D>(); baseObj = transform.parent.Find("Base").gameObject; academy = GameObject.Find("NNLandingAcademy").GetComponent <NNLandingAcademy>(); reset(); }
void Start() { motorDerecho = transform.Find("Derecha").gameObject; motorIzquierdo = transform.Find("Izquierda").gameObject; motorCentral = transform.Find("Centro").gameObject; fuegoCentral = motorCentral.transform.Find("Fuego").gameObject; fuegoDerecho = motorDerecho.transform.Find("Fuego").gameObject; fuegoIzquierdo = motorIzquierdo.transform.Find("Fuego").gameObject; rigidBody = GetComponent <Rigidbody2D>(); academy = GameObject.Find("NNLandingAcademy").GetComponent <NNLandingAcademy>(); thrustSpeed = academy.thrustSpeed; }