Ejemplo n.º 1
0
        void Start()
        {
            mPath = new List<StageCell>();
            mNextPosition = transform.position;
            mTimer = 0.01f;
            mMoveDirection = Vector3.zero;
            mPathIndex = 0;

            GhostMode = GhostModeEnum.Chase;

            UpdatePathToPacman();
        }
Ejemplo n.º 2
0
        void Start()
        {
            mPath          = new List <StageCell>();
            mNextPosition  = transform.position;
            mTimer         = 0.01f;
            mMoveDirection = Vector3.zero;
            mPathIndex     = 0;

            GhostMode = GhostModeEnum.Chase;

            UpdatePathToPacman();
        }
Ejemplo n.º 3
0
        public void ChangeGhostMode(GhostModeEnum newMode)
        {
            if (GhostMode != newMode) {

                if (newMode == GhostModeEnum.Chase) {
                    GhostSphere.GetComponent<Renderer>().sharedMaterial = NormalMaterial;
                }
                else if (newMode == GhostModeEnum.Frightened) {
                    GhostSphere.GetComponent<Renderer>().sharedMaterial = FrightenedMaterial;
                    mFrightenedTimer = 0;
                }
                else if (newMode == GhostModeEnum.Scatter) {

                }

                GhostMode = newMode;
            }
        }
Ejemplo n.º 4
0
        public void ChangeGhostMode(GhostModeEnum newMode)
        {
            if (GhostMode != newMode)
            {
                if (newMode == GhostModeEnum.Chase)
                {
                    GhostSphere.GetComponent <Renderer>().sharedMaterial = NormalMaterial;
                }
                else if (newMode == GhostModeEnum.Frightened)
                {
                    GhostSphere.GetComponent <Renderer>().sharedMaterial = FrightenedMaterial;
                    mFrightenedTimer = 0;
                }
                else if (newMode == GhostModeEnum.Scatter)
                {
                }

                GhostMode = newMode;
            }
        }