Beispiel #1
0
		// Use this for initialization
		void Start () {
			player = GetComponent<Player> ();
			
			SphereCollider sphere = GetComponent<SphereCollider> ();
			sphere.isTrigger = true;
			sphere.radius = 0.1f;
			sphere.radius = visibleRadius;
		}
Beispiel #2
0
		internal override bool DoEffect(Player p){
			if (colCount == 0){
				colCount++;
				//Debug.Log("Mine collision : " + colCount);
				return false;
			}
			else {
				p.health -=dmg;
				//Debug.Log("Die you f**k");
				return true;
			}
		}
Beispiel #3
0
	internal override bool DoEffect(Player p){
		
		stayingAlive=true;
		stayingOut = true;

		if((p.kills >= minimumRequiredKills)
		   && p.neededWins == 1){
			Application.LoadLevel(++levelCount);
		}
		else if(p.kills >= minimumRequiredKills){
			p.neededWins -= 1;
		}

		return true;
	}
Beispiel #4
0
		internal override bool DoEffect (Player p) {
			Debug.Log ("DOING THINGS!");
			stayingAlive = true;

			if ((p.flags >= minimumFlagsRequired)
					&& p.neededWins <= 1) {
					Debug.Log ("You Win");
					Application.LoadLevel ("Lv" + (1 + levelCount));

			} else if (p.flags >= minimumFlagsRequired) {
					stayingOut = true;
					p.neededWins -= 1;
					Debug.Log ("You need more wins");

			} else {
					stayingOut = true;
					Debug.Log ("else?");
			}

			return false;
		}
Beispiel #5
0
		internal override bool DoEffect(Player p){
			p.armor += amount;
			return false;
		}
Beispiel #6
0
	internal override bool DoEffect(Player p) {
		p.ammo += amount;
		return true;
	}
Beispiel #7
0
		// Registers that a flag has been picked up.
		internal override bool DoEffect (Player p){
			p.flags++;
			return false;
		}
Beispiel #8
0
		// The return is true if this pickup is to be destroyed after
		internal abstract bool DoEffect(Player p);
		internal override bool DoEffect(Player p) {
			p.armorRegenBonus = amount;
			p.regenTime = time;
			return false;
		}
Beispiel #10
0
	internal override bool DoEffect(Player p){
		p.health += amount;
		return false;
	}