Example #1
0
        //private void Start()
        //{
        //    //gameModeCTF = GameObject.FindWithTag("GameManager").GetComponent<GameModeCTF>();

        //    if (gameModeCTF == null)
        //    {
        //        Debug.LogError("Could not fund GameModeCTF");
        //    }
        //}
        private void OnTriggerEnter(Collider other)
        {
            PlayerHandler player = other.GetComponent <PlayerHandler>();

            if (player != null)
            {
                //if (player.GetWeaponTeamID() != teamID)
                //{
                //    return;
                //}
                if (player.IsHoldingFlag && player.teamID == teamID)
                {
                    player.CmdUpdateTeamScores(teamID);
                    player.ReturnFlag();
                    ResetFlag();
                }
            }
        }