Exemplo n.º 1
0
        private void Init()
        {
            mTurret      = transform.Find(DataConfigure.PATH_TOWER_TURRET).transform;
            mAudioSource = transform.GetComponent <AudioSource>();

            CustomInit();

            mAttackInterval  = CastleUtility.CalculateIntervalBetweenAttack(mAttackRate);
            mAttackTimeCount = mAttackInterval;
        }
Exemplo n.º 2
0
        private void Init()
        {
            CustomInit();

            mHP = mMaxHP;
            InitHPSlider();

            mAttackInterval = CastleUtility.CalculateIntervalBetweenAttack(mAttackRate);
            mAttackedTime   = Time.time - mAttackInterval;

            mAnimator = transform.GetComponent <Animator>();

            mWayPointsTransformList = WayPoints.wayPointTransformList;
            mNextWayPointIndex      = 0;
            mCastle = GetCastle();
        }