增加初始推力
This commit is contained in:
parent
dd00ce6fbc
commit
29d396dfa1
@ -32,7 +32,7 @@ namespace GameLogic
|
|||||||
public int m_Index;
|
public int m_Index;
|
||||||
private List<UnitPlayerData> m_ListUnitPlayDatas = new List<UnitPlayerData>();
|
private List<UnitPlayerData> m_ListUnitPlayDatas = new List<UnitPlayerData>();
|
||||||
|
|
||||||
private int m_AddPush = 0; // 初始推力值
|
private int m_AddPush = 10; // 初始推力值
|
||||||
private long m_AllPush = 0; // 当前总值
|
private long m_AllPush = 0; // 当前总值
|
||||||
private int m_AllAddPush = 0;//永久增加推力值
|
private int m_AllAddPush = 0;//永久增加推力值
|
||||||
|
|
||||||
@ -74,12 +74,6 @@ namespace GameLogic
|
|||||||
m_tmpSign.text = DataGameSceneManager.Instance.m_Strs[i];
|
m_tmpSign.text = DataGameSceneManager.Instance.m_Strs[i];
|
||||||
m_tmpAllValue.text = m_AllPush.ToString();
|
m_tmpAllValue.text = m_AllPush.ToString();
|
||||||
|
|
||||||
//// 根据当前动画Id 获取纹理列表
|
|
||||||
//TextureEntry textureEntry = DataGameSceneManager.Instance.m_TextureManager.GetTexture("1");
|
|
||||||
|
|
||||||
//// 播放序列图
|
|
||||||
//PlayTextureSequence(textureEntry, 0.05f, true);
|
|
||||||
|
|
||||||
// 播放序列图,通过Gpu的形式
|
// 播放序列图,通过Gpu的形式
|
||||||
LoadTextureMatRes(1);
|
LoadTextureMatRes(1);
|
||||||
}
|
}
|
||||||
@ -167,97 +161,15 @@ namespace GameLogic
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 加载动图
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key"></param>
|
||||||
private void LoadTextureMatRes(int key)
|
private void LoadTextureMatRes(int key)
|
||||||
{
|
{
|
||||||
m_ImgSprite.material = GameModule.Resource.LoadAsset<Material>("0" + key);
|
m_ImgSprite.material = GameModule.Resource.LoadAsset<Material>("0" + key);
|
||||||
}
|
}
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
///// 开始播放 TextureEntry 的序列图
|
|
||||||
///// </summary>
|
|
||||||
///// <param name="textureEntry">要播放的 TextureEntry</param>
|
|
||||||
///// <param name="interval">每帧的时间间隔(秒)</param>
|
|
||||||
///// <param name="loop">是否循环播放</param>
|
|
||||||
//public void PlayTextureSequence(TextureEntry textureEntry, float interval, bool loop = true)
|
|
||||||
//{
|
|
||||||
// if (textureEntry == null || textureEntry.Textures == null || textureEntry.Textures.Count == 0)
|
|
||||||
// {
|
|
||||||
// Debug.LogWarning("TextureEntry 或其 Textures 列表为空,无法播放序列图。");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// m_CurrentTextureEntry = textureEntry;
|
|
||||||
// m_FrameInterval = interval;
|
|
||||||
// m_Loop = loop;
|
|
||||||
// m_CurrentTextureIndex = 0;
|
|
||||||
// m_TimeSinceLastFrame = 0f;
|
|
||||||
// m_IsPlaying = true;
|
|
||||||
|
|
||||||
// // 立即显示第一帧
|
|
||||||
// UpdateTexture();
|
|
||||||
//}
|
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
///// 停止播放序列图
|
|
||||||
///// </summary>
|
|
||||||
//public void StopTextureSequence()
|
|
||||||
//{
|
|
||||||
// m_IsPlaying = false;
|
|
||||||
//}
|
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
///// 更新纹理播放逻辑
|
|
||||||
///// </summary>
|
|
||||||
//private void UpdateTextureSequence(float deltaTime)
|
|
||||||
//{
|
|
||||||
// if (!m_IsPlaying || m_CurrentTextureEntry == null || m_CurrentTextureEntry.Textures == null)
|
|
||||||
// return;
|
|
||||||
|
|
||||||
// // 累加时间
|
|
||||||
// m_TimeSinceLastFrame += deltaTime;
|
|
||||||
|
|
||||||
// // 如果时间超过帧间隔,切换到下一帧
|
|
||||||
// if (m_TimeSinceLastFrame >= m_FrameInterval)
|
|
||||||
// {
|
|
||||||
// m_TimeSinceLastFrame -= m_FrameInterval; // 重置时间
|
|
||||||
// m_CurrentTextureIndex++;
|
|
||||||
|
|
||||||
// // 如果到达末尾
|
|
||||||
// if (m_CurrentTextureIndex >= m_CurrentTextureEntry.Textures.Count)
|
|
||||||
// {
|
|
||||||
// if (m_Loop)
|
|
||||||
// {
|
|
||||||
// m_CurrentTextureIndex = 0; // 循环播放
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// StopTextureSequence(); // 停止播放
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // 更新纹理
|
|
||||||
// UpdateTexture();
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
///// <summary>
|
|
||||||
///// 更新当前显示的纹理
|
|
||||||
///// </summary>
|
|
||||||
//private void UpdateTexture()
|
|
||||||
//{
|
|
||||||
// if (m_CurrentTextureEntry == null || m_CurrentTextureEntry.Textures == null || m_CurrentTextureIndex >= m_CurrentTextureEntry.Textures.Count)
|
|
||||||
// return;
|
|
||||||
|
|
||||||
// Texture2D currentTexture = m_CurrentTextureEntry.Textures[m_CurrentTextureIndex];
|
|
||||||
// if (currentTexture != null)
|
|
||||||
// {
|
|
||||||
// m_ImgSprite.sprite = Sprite.Create(
|
|
||||||
// currentTexture,
|
|
||||||
// new Rect(0, 0, currentTexture.width, currentTexture.height),
|
|
||||||
// new Vector2(0.5f, 0.5f)
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unity 的 Update 方法
|
/// Unity 的 Update 方法
|
||||||
@ -266,9 +178,6 @@ namespace GameLogic
|
|||||||
{
|
{
|
||||||
base.OnUpdate();
|
base.OnUpdate();
|
||||||
|
|
||||||
|
|
||||||
//// 更新序列图播放逻辑
|
|
||||||
//UpdateTextureSequence(Time.deltaTime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user