Example #1
0
    private void BotControlled()
    {
        if (gameObject.GetComponent("GUIPlayer"))
        {
            Destroy(gameObject.GetComponent("GUIPlayer"));
        }

        fireRocketData     = hatchControl.AddComponent("LaunchRocket") as LaunchRocket;
        fireShellData      = gun.AddComponent("LaunchShell") as LaunchShell;
        movement           = gameObject.AddComponent("SetPosition") as SetPosition;
        positionCursorData = gunShieldControl.AddComponent("SetCursor") as SetCursor;
        lazerDetectorData  = GameObject.Find(user + "Lazer").AddComponent("LazerDetector") as LazerDetector;

        gameObject.tag = "Bot";
    }
Example #2
0
	private void BotControlled()
	{
		if(gameObject.GetComponent("GUIPlayer"))
		{
			Destroy(gameObject.GetComponent("GUIPlayer"));
		}
		
		fireRocketData = hatchControl.AddComponent("LaunchRocket") as LaunchRocket;  
		fireShellData = gun.AddComponent("LaunchShell") as LaunchShell;
		movement = gameObject.AddComponent("SetPosition") as SetPosition;
		positionCursorData = gunShieldControl.AddComponent("SetCursor") as SetCursor;
		lazerDetectorData = GameObject.Find(user + "Lazer").AddComponent("LazerDetector") as LazerDetector;
		
		gameObject.tag = "Bot";
	}