public TrojanForm(Trojan server = default) { server ??= new Trojan(); Server = server; CreateTextBox("Password", "Password", s => true, s => server.Password = s, server.Password); CreateTextBox("Host", "Host", s => true, s => server.Host = s, server.Host); }
public override void HandleInput(InputHelper inputHelper) { base.HandleInput(inputHelper); if (makePacket) { int rand = GameEnvironment.Random.Next(15); GameObjectList level = this.parent as GameObjectList; SpriteGameObject home = GameWorld.Find("home") as SpriteGameObject; GameObjectList TowerList = GameWorld.Find("towerlist") as GameObjectList; if ((rand == 1 || rand == 2) && spawnVirus == true) { Virus virus = new Virus(this.position + this.Center, this, TowerList, home); level.Add(virus); } else if (rand == 3 && spawnTrojan == true) { Trojan trojan = new Trojan(this.position + this.Center, this, TowerList, home); level.Add(trojan); } else { Packet packet = new Packet(this.position + this.Center, serverColor, type, this, TowerList, home); GameObjectList packetList = level.Find("packetList") as GameObjectList; packetList.Add(packet); } makePacket = false; } }
public void OnLevelWasLoaded(int level) { if (GameObject.FindGameObjectWithTag("Player") != null) { Debug.Log("POW"); playerObject = GameObject.FindGameObjectWithTag("Player"); pCon = playerObject.GetComponent <PlayerController>(); gMan = playerObject.GetComponent <GunManager>(); dMal = GameObject.FindGameObjectWithTag("Carrier").GetComponent <Malware>(); dAd = GameObject.FindGameObjectWithTag("Carrier").GetComponent <Adware>(); dTro = GameObject.FindGameObjectWithTag("Carrier").GetComponent <Trojan>(); for (int x = 0; x < ammo.Length; x++) { gMan.m_WeaponList[x].ammo = ammo[x]; } pCon.maxHp = maxHp; pCon.health = hP; dTro.trojan = trojan; dMal.Maled = mal; dAd.triggered = ad; game = true; } }
public TrojanForm(Trojan server = default) { server ??= new Trojan(); Server = server; }
public TrojanForm(Server server = default) { InitializeComponent(); _server = (Trojan)(server ?? new Trojan()); }