public LoopRefresh(int characterID, string name, E_CharacterType type, CharacterRefreshPO characterRefreshPO) { mCharacterID = characterID; mPrefabName = name; mCharacterType = type; mCharacterRefreshPo = characterRefreshPO; }
public CharacterBaseAttr(CharacterPO agentPO) { mID = agentPO.Id; mPrefabName = agentPO.Name; mCharacterType = (E_CharacterType)agentPO.Type; mBaseSpeed = agentPO.BaseSpeed; mBaseRotationSpeed = agentPO.RotationSpeed; mMaxHP = agentPO.Health; mWorth = agentPO.Score; mDamageValue = agentPO.DamageValue; mBornEffectName = agentPO.BornEffect; mBeAttackedEffectName = agentPO.HitEffect; mDeadEffectName = agentPO.DieEffet; mExplodeEffectSoundName = agentPO.ExplodeEffectSound; mBeDestroyEffectSoundName = agentPO.DestroyEffectSound; mBeDestroySoundName = agentPO.DestroySound; mDisappearTime = agentPO.DisappearTime; mValidTime = agentPO.ValidTime; mFogTime = agentPO.FogTime; mFreezeTime = agentPO.FreezeTime; mOffset_Y = agentPO.Offset_Y; mHeadID = agentPO.HeadID; mMapID = agentPO.MapID; mHitBone = agentPO.HitBone; }
public virtual void UpdateWaterPull(E_CharacterType characterType) { if (!mCheckWaterPullList.Contains(characterType) || mCheckWaterPullList.Count == 0) { return; } mCheckWaterPullList.Remove(characterType); if (mCheckWaterPullList.Count == 0) { ioo.gameMode.RunState(E_GameState.Water); } }
public override void Notify(params int[] args) { mCharacterType = (E_CharacterType)args[0]; base.Notify(args); }
/// <summary> /// 按照刷新表动态刷新场景活动单元 /// </summary> void RefreshCharacter() { while (true) { int refreshID = 100000 + ((int)mStageSystem.sceneID) * 10000 + mStageSystem.refreshIndex; CharacterRefreshPO characterRefreshPO = CharacterRefreshData.Instance.GetCharacterRefreshPO(refreshID); if (characterRefreshPO == null) { break; } if (characterRefreshPO.Stage != mLv) { break; } if (characterRefreshPO.AppeareTime > mStageTimer) { return; } CharacterBaseAttr baseAttr = FactoryManager.attrFactory.GetCharacterBaseAttr(characterRefreshPO.CharacterID); if (characterRefreshPO.Loop == 1) { LoopRefresh lr = new LoopRefresh(characterRefreshPO.CharacterID, baseAttr.name, baseAttr.characterType, characterRefreshPO); mLoopList.Add(lr); ++mStageSystem.refreshIndex; continue; } E_CharacterType characterType = baseAttr.characterType; switch (characterType) { case E_CharacterType.Player: ISpawnCommand command = new SpawnCharacterCommand(baseAttr.id, characterRefreshPO); mCommands.Add(command); break; case E_CharacterType.Map: command = new SpawnMapCommand(baseAttr.id, characterRefreshPO); mCommands.Add(command); break; case E_CharacterType.Citizen0: case E_CharacterType.Citizen1: case E_CharacterType.Citizen2: command = new SpawnCitizenCommand(baseAttr.id, characterRefreshPO); mCommands.Add(command); break; case E_CharacterType.Npc: for (int i = 0; i < characterRefreshPO.StepCount; ++i) { command = new SpawnNpcCommand(baseAttr.id, characterRefreshPO); mCommands.Add(command); } break; case E_CharacterType.SandBox: case E_CharacterType.Bucket: command = new SpawnPropCommand(baseAttr.id, characterRefreshPO, Vector3.zero); mCommands.Add(command); break; case E_CharacterType.BullDemonKing: command = new SpawnBullDemonKingCommand(baseAttr.id, characterRefreshPO); mCommands.Add(command); break; case E_CharacterType.AngerBear: command = new SpawnBearCommand(baseAttr.id, characterRefreshPO); mCommands.Add(command); break; case E_CharacterType.Wolf: command = new SpawnWolfCommand(baseAttr.id, characterRefreshPO); mCommands.Add(command); break; } ++mStageSystem.refreshIndex; } }
public bool Decode(BinaryDecoder decoder) { if (!BinaryCodec.Decode(decoder, out _ID)) { return(false); } if (!BinaryCodec.Decode(decoder, out _Name)) { return(false); } { int enumValue = 0; if (!BinaryCodec.Decode(decoder, out enumValue)) { return(false); } _CharacterType = (E_CharacterType)enumValue; } if (!BinaryCodec.DecodeUnicodeString(decoder, out _displayName)) { return(false); } if (!BinaryCodec.Decode(decoder, out _spriteName)) { return(false); } if (!BinaryCodec.Decode(decoder, out _default_str)) { return(false); } if (!BinaryCodec.Decode(decoder, out _default_dex)) { return(false); } if (!BinaryCodec.Decode(decoder, out _default_con)) { return(false); } if (!BinaryCodec.Decode(decoder, out _default_int)) { return(false); } if (!BinaryCodec.Decode(decoder, out _default_spr)) { return(false); } if (!BinaryCodec.Decode(decoder, out _default_wis)) { return(false); } if (!BinaryCodec.Decode(decoder, out _default_hp)) { return(false); } if (!BinaryCodec.Decode(decoder, out _default_mp)) { return(false); } if (!BinaryCodec.Decode(decoder, out _rewordXP)) { return(false); } if (!BinaryCodec.Decode(decoder, out _rewordGold)) { return(false); } if (!BinaryCodec.Decode(decoder, out _isDrop)) { return(false); } if (!BinaryCodec.Decode(decoder, out _dropList)) { return(false); } return(true); }