void Start() { if (gameObject.transform.FindChild("Turrent")) { turret = gameObject.transform.FindChild("Turrent").gameObject; } gunnerScript = GetComponent<GunnerController>(); if (gunnerScript) { gturretrotation = gunnerScript.transform.rotation; } var playerName = PhotonNetwork.player.name; if (photonView.isMine) { GetComponent<ClientSync>().enabled = true; myCamera.SetActive(true); gameObject.name = playerName; if (playerName == "driver") { GetComponent<DriverController>().enabled = true; } if (playerName == "gunner") { GetComponent<GunnerController>().enabled = true; } } else { StartCoroutine("Alive"); } }
private void Start() { controller = this.GetComponent <Controller2D>(); enemyController = this.GetComponent <EnemyController2D>(); gunnerController = this.GetComponent <GunnerController>(); stats = this.GetComponent <StatManager>(); charRenderer = this.GetComponent <SpriteRenderer>(); animator = this.GetComponent <Animator>(); }
public PlayerRotatingGun(Ship parent, Vector2 positionRelativeToParent, float directionRelativeToParent, GunnerController controller) : base(parent, positionRelativeToParent, directionRelativeToParent, (float)(Math.PI * .5)) { controller.Register(this); this.controller = controller; Gun gun1 = new Gun(this, new Vector2(50f, 10), 0); GameObject.Collection.Add(gun1); Gun gun2 = new Gun(this, new Vector2(50f, -10), 0); GameObject.Collection.Add(gun2); }
public GunnerDead(Transform gunner) { this.gunner = gunner.GetComponent<GunnerController>(); }
public GunnerDead(Transform gunner) { this.gunner = gunner.GetComponent <GunnerController>(); }
public GunnerAttackingPlayer(Transform gunner) { this.gunner = gunner.GetComponent <GunnerController>(); }
public GunnerInFormation(Transform gunner) { this.gunner = gunner.GetComponent <GunnerController>(); }
public GunnerMovingToPosition(Transform gunner) { this.gunner = gunner.GetComponent <GunnerController>(); }
public GunnerInFormation(Transform gunner) { this.gunner = gunner.GetComponent<GunnerController>(); }
public GunnerMovingToPosition(Transform gunner) { this.gunner = gunner.GetComponent<GunnerController>(); }
public override void Execute(EnemyController enemyController) { GunnerController gunnerController = (GunnerController)enemyController; gunnerController.shootPlayer(); }
public GunnerReachedScreenEdge(Transform gunner) { this.gunner = gunner.GetComponent <GunnerController>(); randomPos = Vector3.zero; }
public GunnerAttackingPlayer(Transform gunner) { this.gunner = gunner.GetComponent<GunnerController>(); }
public GunnerReachedScreenEdge(Transform gunner) { this.gunner = gunner.GetComponent<GunnerController>(); randomPos = Vector3.zero; }