private void Update() { CritterStates(); See(); if (Creature != null) { critterscript = Creature.GetComponent <Critter>(); if (Gene.isMale == critterscript.Gene.isMale && critterscript.AICritter != StateCritter.Mate) { Debug.Log("1"); AICritter = StateCritter.Fight; } } }
public void Fight(Critter OtherCreature) { //checks if the aggression of the critter is greater then his resolve. if (m_Hunger >= Gene.m_Aggression) { Debug.Log("3"); if (Gene.m_Strength >= OtherCreature.Gene.m_Strength) { Debug.Log("4a"); Destroy(Creature.gameObject); m_Hunger = 0; AICritter = StateCritter.Idle; } else { Debug.Log("4b"); } } }