Mine.Update C# (CSharp) Method

Update() private method

private Update ( ) : void
return void
	void Update () {

		autoReset();
	
		detection ();

		//Start the red light of the mine

		if(transform.FindChild("Point light"))
		{
			if(_isNear && !transform.FindChild("Point light").GetComponent<TriggeredLight>().getIsStarting())
			{
				transform.FindChild("Point light").GetComponent<TriggeredLight>().triggerStart();
			}

			//end the red light of the mine
			else if (!_isNear && transform.FindChild("Point light").GetComponent<TriggeredLight>().getIsStarting())
			{
				transform.FindChild("Point light").GetComponent<TriggeredLight>().triggerExit();
			}
		}
	}

Usage Example

コード例 #1
0
 public void UpdateArmy(World world)
 {
     Mine.Update(world);
     Opponent.Update(world);
 }