// Use this for initialization void Start() { _input = GameObject.Find("GameController").GetComponent <InputHandler> (); _health = GetComponent <HealthHandler> (); _move = GetComponent <MovementHandler> (); _shoot = GetComponent <ShootHandler> (); _collision = GetComponent <CollisionHandler> (); }
override protected void Start() { _shootHandler = gameObject.GetComponentInChildren <ShootHandler>(); _lifeHandler = gameObject.GetComponent <ShipLifeHandler>(); MaxSpeed = MAX_SPEED; //speed we can reach in 1 sec RotSpeed = ROT_SPEED; //speed we can turn in 1 sec ShipBoundaryRadius = BOUNDARY_RADIUS; _lifeHandler.Health = HEALTH; _shootHandler.DamageDealtModifier = DAMAGE_DEALT_MODIFIER; }
override protected void Start() { _shootHandler = gameObject.GetComponentInChildren <ShootHandler>(); _lifeHandler = gameObject.GetComponent <ShipLifeHandler>(); MaxSpeed = MAX_SPEED; //speed we can reach in 1 sec RotSpeed = ROT_SPEED; //speed we can turn in 1 sec ShipBoundaryRadius = BOUNDARY_RADIUS; ResetHealth(); _shootHandler.DamageDealtModifier = DAMAGE_DEALT_MODIFIER; _shootHandler.PlayerLayer = this.gameObject.layer; NetworkServerUI.SendHealthInfo((gameObject.layer - Constants.LAYER_OFFSET) + 1, HEALTH, true); }
private static void Server_OnRequestReceived(NetPeer peer, byte[] data, string networkID) { ClientController client = null; lock (ClientsLock) { client = ClientControllers.Find(x => x.Peer == peer); } if (client == null) { return; } NetDataRequest ndata = Utils.FromBytesJSON <NetDataRequest>(data); if (string.IsNullOrEmpty(client.Client.Nickname)) { switch (ndata.Type) { case RequestTypes.Login: LoginHandler.DoHandle(ndata, client, networkID); break; } } else { switch (ndata.Type) { case RequestTypes.EnterInMission: EnterInMissionHandler.DoHandle(ndata, client, networkID); break; case RequestTypes.SyncPlayer: SyncPlayerHandler.DoHandle(ndata, client, networkID); break; case RequestTypes.Shoot: ShootHandler.DoHandle(ndata, client, networkID); break; case RequestTypes.GetRooms: GetRoomsHandler.DoHandle(ndata, client, networkID); break; case RequestTypes.CreateRoom: CreateRoomHandler.DoHandle(ndata, client, networkID); break; case RequestTypes.EnterInRoom: EnterInRoomHandler.DoHandle(ndata, client, networkID); break; case RequestTypes.StartMission: StartMissionHandler.DoHandle(ndata, client, networkID); break; case RequestTypes.LeaveRoom: LeaveRoomHandler.DoHandle(ndata, client, networkID); break; case RequestTypes.SyncRoom: ProjectKillersServer.RequestHandlers.SyncRoomHandler.DoHandle(ndata, client, networkID); break; } } }
// Use this for initialization void Start() { _shootHandler = GetComponent<ShootHandler>(); ship = GetComponentInParent<Ship>(); shipName = ship.name; }
private void Start() { _shootHandler = FindObjectOfType <ShootHandler>(); speedText.text = _shootHandler.gravity.ToString(); heightText.text = _shootHandler.firingAngle.ToString(); }
// Use this for initialization void Start() { _animator = GetComponent <Animator> (); _shoot = GetComponentInParent <ShootHandler> (); }