void Start() { Задержка = 0.2f; StartLightStep1 = true; StartLightStep2 = false; _hp = Ship.GetComponent <HealthModule> (); _otv = Ship.GetComponent <ObjectTypeVisible> (); }
// Use this for initialization void Awake() { _sbsm = gameObject.GetComponent <SensorModule>(); _sbotv = gameObject.GetComponent <ObjectTypeVisible>(); GameObject SenObj = Instantiate(SensorsLine, gameObject.transform.position, gameObject.transform.rotation); SensorsLine = SenObj; _scr = SenObj.GetComponent <CircleRenderer>(); _sespa = SenObj.GetComponent <EnterSelectPlaneActive>(); GameObject WepObj = Instantiate(WeaponLine, gameObject.transform.position, gameObject.transform.rotation); WeaponLine = WepObj; _wcr = WepObj.GetComponent <CircleRenderer>(); _wespa = WepObj.GetComponent <EnterSelectPlaneActive>(); _sespa.Owner = gameObject; _wespa.Owner = gameObject; }
// Use this for initialization void Awake() { if (gameObject.GetComponent <ObjectTypeVisible>()) { _otv = gameObject.GetComponent <ObjectTypeVisible>(); } _HP = gameObject.GetComponent <HealthModule>(); if (!NonPhysicalMovement) { _agent = gameObject.GetComponent <MoveComponent>(); } GameObject SenObj = Instantiate(SensorsLine, gameObject.transform.position, gameObject.transform.rotation); SensorsLine = SenObj; _scr = SenObj.GetComponent <CircleRenderer>(); _sespa = SenObj.GetComponent <EnterSelectPlaneActive>(); GameObject WepObj = Instantiate(WeaponLine, gameObject.transform.position, gameObject.transform.rotation); WeaponLine = WepObj; _wcr = WepObj.GetComponent <CircleRenderer>(); _wespa = WepObj.GetComponent <EnterSelectPlaneActive>(); _sespa.Owner = gameObject; _wespa.Owner = gameObject; _es = gameObject.GetComponent <SensorModule>(); if (StartLocation == null) { targetVector = transform.position; } else { _agent.Movement(StartLocation.transform.position); } }