Beispiel #1
0
 //play sound
 // Use this for initialization
 public override void Start()
 {
     base.Start();
     STATE_BIRTH = new BirthStateCircleUnit(gameObject);
     STATE_IDLE = new IdleStateCircleUnit(gameObject);
     STATE_DEATH = new DeathStateCircleUnit(gameObject);
     STATE_PROD = new ProdStateCircleUnit(gameObject);
     STATE_ATTACK = new AttackStateCircleUnit(gameObject);
     STATE_GOINGTO = new GoingToStateCircleUnit(gameObject);
     STATE_TRIANGLEPROD = new TriangleProdStateCircleUnit(gameObject);
     currentState = STATE_BIRTH;
     env = Environnement.getUniqueEnv();
     distancePercept = 30.0f;
     distanceAttack = 0.05f;//seems to be useless ... something messy somewhere
     setInitialEnergy(200.0f);
     attackStrength = 2.0f;
     attackFrequency = 240;
     speed = 30.0f;
     destination = Vector3.zero;
     initialVectorScale = gameObject.transform.localScale ;
 }
Beispiel #2
0
 public void setCurrentState(StateCircleUnit newState)
 {
     currentState = newState;
 }