예제 #1
0
    private void Start()
    {
        if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
        {
            Destroy(gameObject);
        }
        else if (IN_GAME_MAIN_CAMERA.gamemode != GAMEMODE.PVP_CAPTURE)
        {
            if (photonView.isMine)
            {
                Destroy(gameObject);
            }

            Destroy(gameObject);
        }
        else
        {
            chkPts.Add(this);
            IComparer comparer = new IComparerPVPchkPtID();
            chkPts.Sort(comparer);
            if (humanPt == humanPtMax)
            {
                state = CheckPointState.Human;
                if (photonView.isMine && LevelInfo.getInfo(FengGameManagerMKII.level).mapName != "The City I")
                {
                    supply = PhotonNetwork.Instantiate("aot_supply", transform.position - Vector3.up * (transform.position.y - getHeight(transform.position)), transform.rotation, 0);
                }
            }
            else if (photonView.isMine && !hasAnnie)
            {
                if (Random.Range(0, 100) < 50)
                {
                    var num = Random.Range(1, 2);
                    for (var i = 0; i < num; i++)
                    {
                        newTitan();
                    }
                }

                if (isBase)
                {
                    newTitan();
                }
            }

            if (titanPt == titanPtMax)
            {
                state = CheckPointState.Titan;
            }

            hitTestR             = 15f * size;
            transform.localScale = new Vector3(size, size, size);
        }
    }
예제 #2
0
 private void Start()
 {
     if (IN_GAME_MAIN_CAMERA.gametype == GAMETYPE.SINGLE)
     {
         UnityEngine.Object.Destroy(base.gameObject);
     }
     else if (IN_GAME_MAIN_CAMERA.gamemode != GAMEMODE.PVP_CAPTURE)
     {
         if (base.photonView.isMine)
         {
             UnityEngine.Object.Destroy(base.gameObject);
         }
         UnityEngine.Object.Destroy(base.gameObject);
     }
     else
     {
         chkPts.Add(this);
         IComparer comparer = new IComparerPVPchkPtID();
         chkPts.Sort(comparer);
         if (this.humanPt == this.humanPtMax)
         {
             this.state = CheckPointState.Human;
             if (base.photonView.isMine && (FengGameManagerMKII.lvlInfo.mapName != "The City I"))
             {
                 this.supply = PhotonNetwork.Instantiate("aot_supply", base.transform.position - ((Vector3)(Vector3.up * (base.transform.position.y - this.getHeight(base.transform.position)))), base.transform.rotation, 0);
             }
         }
         else if (base.photonView.isMine && !this.hasAnnie)
         {
             if (RCSettings.AnnieSurvive == 0)
             {
                 if (UnityEngine.Random.Range(0, 100) < 50)
                 {
                     int num = UnityEngine.Random.Range(1, 2);
                     for (int i = 0; i < num; i++)
                     {
                         this.newTitan();
                     }
                 }
                 if (this.isBase)
                 {
                     this.newTitan();
                 }
             }
         }
         if (this.titanPt == this.titanPtMax)
         {
             this.state = CheckPointState.Titan;
         }
         this.hitTestR             = 15f * this.size;
         base.transform.localScale = new Vector3(this.size, this.size, this.size);
     }
 }
예제 #3
0
    private void Start()
    {
        fengGame = GameObject.Find("MultiplayerManager").GetComponent <FengGameManagerMKII>();
        if (IN_GAME_MAIN_CAMERA.Gametype == GameType.Singleplayer)
        {
            Object.Destroy(base.gameObject);
            return;
        }
        if (FengGameManagerMKII.Level.Mode != GameMode.PVP_CAPTURE)
        {
            Object.Destroy(base.gameObject);
            return;
        }
        chkPts.Add(this);
        IComparer comparer = new IComparerPVPchkPtID();

        chkPts.Sort(comparer);
        if (humanPt == humanPtMax)
        {
            state = CheckPointState.Human;
            if (base.photonView.isMine && FengGameManagerMKII.Level.Map != "The City I")
            {
                Vector3 position  = base.transform.position;
                Vector3 up        = Vector3.up;
                Vector3 position2 = base.transform.position;
                supply = PhotonNetwork.Instantiate("aot_supply", position - up * (position2.y - GetHeight(base.transform.position)), base.transform.rotation, 0);
            }
        }
        else if (base.photonView.isMine && !hasAnnie)
        {
            if (Random.Range(0, 100) < 50)
            {
                int num = Random.Range(1, 2);
                for (int i = 0; i < num; i++)
                {
                    NewTitan();
                }
            }
            if (isBase)
            {
                NewTitan();
            }
        }
        if (titanPt == titanPtMax)
        {
            state = CheckPointState.Titan;
        }
        hitTestR = 15f * size;
        base.transform.localScale = new Vector3(size, size, size);
    }
예제 #4
0
    private void Start()
    {
        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
        {
            UnityEngine.Object.Destroy(base.gameObject);
            return;
        }
        if (IN_GAME_MAIN_CAMERA.GameMode != GameMode.PVP_CAPTURE)
        {
            if (BasePV.IsMine)
            {
                UnityEngine.Object.Destroy(base.gameObject);
            }
            UnityEngine.Object.Destroy(base.gameObject);
            return;
        }
        PVPcheckPoint.chkPts.Add(this);
        IComparer comparer = new IComparerPVPchkPtID();

        PVPcheckPoint.chkPts.Sort(comparer);
        if (this.humanPt == this.humanPtMax)
        {
            this.state = CheckPointState.Human;
            if (BasePV.IsMine && FengGameManagerMKII.Level.MapName != "The City I")
            {
                this.supply = Optimization.Caching.Pool.NetworkEnable("aot_supply", base.transform.position - Vectors.up * (base.transform.position.y - this.getHeight(base.transform.position)), base.transform.rotation, 0);
            }
        }
        else if (BasePV.IsMine && !this.hasAnnie)
        {
            if (UnityEngine.Random.Range(0, 100) < 50)
            {
                int num = UnityEngine.Random.Range(1, 2);
                for (int i = 0; i < num; i++)
                {
                    this.newTitan();
                }
            }
            if (this.isBase)
            {
                this.newTitan();
            }
        }
        if (this.titanPt == this.titanPtMax)
        {
            this.state = CheckPointState.Titan;
        }
        this.hitTestR             = 15f * this.size;
        base.transform.localScale = new Vector3(this.size, this.size, this.size);
    }
예제 #5
0
    private void Start()
    {
        if (gamemode == null)
        {
            Destroy(gameObject);
            return;
        }
        SetPreviousCheckpoints();
        chkPts.Add(this);
        IComparer comparer = new IComparerPVPchkPtID();

        chkPts.Sort(comparer);
        if (this.humanPt == this.humanPtMax)
        {
            this.state = CheckPointState.Human;
            if (base.photonView.isMine && (FengGameManagerMKII.Level.SceneName != "The City I"))
            {
                this.supply = PhotonNetwork.Instantiate("aot_supply", base.transform.position - ((Vector3)(Vector3.up * (base.transform.position.y - this.getHeight(base.transform.position)))), base.transform.rotation, 0);
            }
        }
        else if (base.photonView.isMine && !this.hasAnnie)
        {
            if (UnityEngine.Random.Range(0, 100) < 50)
            {
                int num = UnityEngine.Random.Range(1, 2);
                for (int i = 0; i < num; i++)
                {
                    this.newTitan();
                }
            }
            if (this.isBase)
            {
                this.newTitan();
            }
        }
        if (this.titanPt == this.titanPtMax)
        {
            this.state = CheckPointState.Titan;
        }
        this.hitTestR             = 15f * this.size;
        base.transform.localScale = new Vector3(this.size, this.size, this.size);
    }