public void ShowInfo(ICamp Camp) { Show(); m_Camp = Camp; // 名称 m_CampNameTxt.text = m_Camp.GetName(); // 训练花费 m_TrainCostTxt.text = string.Format("AP:{0}", m_Camp.GetTrainCost()); // 训练中信息 ShowOnTrainInfo(); // Icon IAssetFactory Factory = RTSFactory.GetAssetFactory(); m_CampImage.sprite = Factory.LoadSprite(m_Camp.GetIconSpriteName()); // 升级功能 if (m_Camp.GetLevel() <= 0) { EnableLevelInfo(false); } else { EnableLevelInfo(true); m_CampLvTxt.text = string.Format("等级:" + m_Camp.GetLevel()); m_WeaponLvTxt.text = string.Format("武器等级:" + m_Camp.GetWeaponLevel()); } }
public override void LoadAsset(int GameObjectID) { IAssetFactory AssetFactory = RTSFactory.GetAssetFactory(); GameObject EnemyGameObject = AssetFactory.LoadEnemy(m_BuildParam.NewCharacter.GetAssetName()); EnemyGameObject.transform.position = m_BuildParam.SpawnPosition; EnemyGameObject.name = string.Format("Enemy[{0}]", GameObjectID); m_BuildParam.NewCharacter.SetGameObject(EnemyGameObject); }