Ejemplo n.º 1
0
    void FirstformatData()
    {
        firstGetData = false;

        if (deadManager == null)
        {
            deadManager = GetComponent <isDead>();
        }

        Net           = GetComponent <PhotonView>();
        ani           = GetComponent <Animator>();
        myCollider    = GetComponent <CapsuleCollider>();
        nav           = GetComponent <NavMeshAgent>();
        myCreatPoints = GetComponent <CreatPoints>();
        if (photonView.isMine)
        {
            // nav.obstacleAvoidanceType = ObstacleAvoidanceType.NoObstacleAvoidance;
            originalData          = MyEnemyData.instance.getMySoldierData(DataName);
            myCreatPoints.enabled = false;
            checkCurrentPlay();
            nav.updateRotation = false;
        }
        else
        {
            originalData = MyEnemyData.instance.getEnemySoldierData(DataName);
            myCreatPoints.ProdecePoints();
            nav.enabled  = false;
            this.enabled = false;
        }
    }
Ejemplo n.º 2
0
        protected void FirstformatData()
        {
            firstGetData      = false;
            Net               = GetComponent <PhotonView>();
            myCachedTransform = this.transform;
            MyCreatPoints     = GetComponent <CreatPoints>();

            if (deadManager == null)
            {
                deadManager = GetComponent <isDead>();
            }

            if (photonView.isMine)
            {
                MyCreatPoints.enabled = false;
                originalTurretData    = TurretData.instance.getTowerData(DataName);
                checkCurrentPlay();
            }
            else
            {
                MyCreatPoints.ProdecePoints(myCachedTransform);
                originalTurretData = TurretData.instance.getEnemyTowerData(DataName);
                this.enabled       = false;
            }
        }
Ejemplo n.º 3
0
    private void Start()
    {
        if (firstGetData)
        {
            FirstFormatData();
        }
        FormatData();

        if (photonView.isMine)
        {
            checkCurrentPlay();
            MyCreatPoints.enabled             = false;
            SceneObjManager.Instance.myPlayer = this;
        }
        else
        {
            MyCreatPoints.ProdecePoints();
            SceneObjManager.Instance.enemy_Player = this;
            this.enabled = false;
        }
    }