|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AIBehaviourHLData |
|
{ |
|
private void AIBehaviourHLData() {} |
|
private void ~AIBehaviourHLData() {} |
|
|
|
|
|
void OnParseConfig(); |
|
|
|
|
|
proto native void ParseBehaviourSlot(string name); |
|
proto native void ParseAlertLevel(string name); |
|
proto native float ReadParamValue(string paramName, float defValue); |
|
|
|
} |
|
|
|
|
|
class AIBehaviourHL |
|
{ |
|
private void AIBehaviourHL() {} |
|
private void ~AIBehaviourHL() {} |
|
|
|
proto native AIBehaviourHLData GetTemplateData(); |
|
|
|
void OnInit(){}; |
|
|
|
|
|
|
|
void Simulate (float timeDelta) |
|
{ |
|
|
|
|
|
} |
|
|
|
|
|
|
|
void OnDamage(float damage, EntityAI source){} |
|
|
|
void OnDamageInflicted(){} |
|
void OnAnimationEvent(int nameCrc){} |
|
|
|
|
|
proto native void SetNextBehaviour(int BehaviourCrc); |
|
proto native void SwitchToNextBehaviour(); |
|
|
|
static proto void RegAIBehaviour(string behname,typename behClass, typename behClassData); |
|
}; |
|
|
|
|
|
class AIBehaviourHLZombie2 : AIBehaviourHL |
|
{ |
|
|
|
|
|
|
|
AIBehaviourHLDataZombie2 GetData() |
|
{ |
|
return AIBehaviourHLDataZombie2.Cast( GetTemplateData() ); |
|
} |
|
|
|
private void AIBehaviourHLZombie2() {} |
|
private void ~AIBehaviourHLZombie2() {} |
|
|
|
override void OnInit() |
|
{ |
|
SetNextBehaviour(0x7b9a4ee9); |
|
SwitchToNextBehaviour(); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
override void Simulate (float timeDelta) |
|
{ |
|
|
|
|
|
} |
|
|
|
void ShowDebugInfo() |
|
{ |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
class AIBehaviourHLDataZombie2 : AIBehaviourHLData |
|
{ |
|
float m_fDamageToCrawl; |
|
float m_fCrawlProbability; |
|
|
|
private void AIBehaviourHLDataZombie2() {} |
|
private void ~AIBehaviourHLDataZombie2() {} |
|
|
|
override void OnParseConfig() |
|
{ |
|
Print("zombie data parse config start"); |
|
|
|
ParseBehaviourSlot("Calm"); |
|
ParseBehaviourSlot("Attracted"); |
|
ParseBehaviourSlot("Disturbed"); |
|
ParseBehaviourSlot("Alerted"); |
|
|
|
ParseAlertLevel("Calm"); |
|
ParseAlertLevel("Disturbed"); |
|
ParseAlertLevel("Attracted"); |
|
ParseAlertLevel("Alerted"); |
|
|
|
m_fDamageToCrawl = ReadParamValue("damageToCrawl",0.01); |
|
m_fCrawlProbability = ReadParamValue("crawlProbability",0.01); |
|
|
|
Print("zombie data parse config end"); |
|
} |
|
}; |
|
|
|
|
|
|
|
|
|
|