public virtual void SetData(EngineEntityData _data) { curData = _data; entityID = _data.entityId; engineValueContainer = new EngineValueContainerEntity(); engineValueContainer.InitializeContainer(this); }
public override void SetData(EngineEntityData _data) { base.SetData(_data); //update unit stats //weight curWeight = CurData.weight; if (rb) { rb.mass = curWeight; } //update controller stats if (controller) { controller.BaseSpeed = CurData.speed; controller.JumpPower = CurData.jumpPower; //controller.StartColHeight = curData.skinSize; controller.StartColCenter = CurData.skinSize / 2; } if (agent) { agent.speed = CurData.speed; } }
protected virtual void OnEnable() { source = (EngineEntityData)target; sourceRef = serializedObject; SetupGUIStyle(); GetProperties(); }
public override void SetData(EngineEntityData _data) { base.SetData(_data); //update data if (skinManager) { if (skinManager.playerSkins.IndexOf(CurData) != -1) { dataManager.SetPlayerSkinData(skinManager.playerSkins.IndexOf(CurData)); } else { Debug.Log("Make sure you add " + _data + " to the skin manager: " + skinManager + "!"); } } }