Beispiel #1
0
 public BaseSingleStepParser(BaseStepController controler, Transform anchor)
 {
     this.controler       = controler;
     this.anchor          = anchor;
     this._currentParam   = new BaseStepController.Param();
     this._lastPosition   = anchor.position;
     this._lastForward    = anchor.forward;
     this._lastEventTimer = 0f;
 }
Beispiel #2
0
        private void Update()
        {
            if (this._lightForwardTransform == null)
            {
                this._lightForwardTransform = Singleton <StageManager> .Instance.GetStageEnv().lightForwardTransform;

                this._lightDir = this._lightForwardTransform.forward;
            }
            List <BaseMonoAvatar> allAvatars = Singleton <AvatarManager> .Instance.GetAllAvatars();

            for (int i = 0; i < allAvatars.Count; i++)
            {
                BaseMonoAvatar key = allAvatars[i];
                if (key.IsActive() && ((this.zone == null) || this.zone.Contain(key.XZPosition)))
                {
                    State state;
                    if (this._avatarStateDict.ContainsKey(key))
                    {
                        state = this._avatarStateDict[key];
                    }
                    else
                    {
                        state = new State();
                        string avatarTypeName = key.AvatarTypeName;
                        state.setting         = !this._avatarTypeNameSettingDict.ContainsKey(avatarTypeName) ? this._defaultSetting : this._avatarTypeNameSettingDict[avatarTypeName];
                        state.particleSystem  = this._settingParticleSystemDict[state.setting];
                        state.controller      = key.GetComponent <BaseStepController>();
                        state.lastLeftPatten  = BaseStepController.Pattern.Void;
                        state.rightLeftPatten = BaseStepController.Pattern.Void;
                        if (state.controller == null)
                        {
                        }
                        this._avatarStateDict.Add(key, state);
                    }
                    BaseStepController controller = state.controller;
                    if (controller != null)
                    {
                        this.HandleStep(controller.currentLeftStepParam, ref state.lastLeftPatten, state);
                        this.HandleStep(controller.currentRightStepParam, ref state.rightLeftPatten, state);
                    }
                }
            }
        }