Esempio n. 1
0
 public void InitializePlanetCombat(IPlanetInput planetInput, int health, Rocket originRocket, Transform shootSpot)
 {
     this.planetInput  = planetInput;
     this.health       = health;
     this.originRocket = originRocket;
     this.shootSpot    = shootSpot;
     fireRate          = originRocket.Cooldown;
     SetUpCombat();
 }
Esempio n. 2
0
    public void AddCombatController(int health, bool isPlayer, Rocket rocket)
    {
        this.isPlayer = isPlayer;
        planetCombat  = gameObject.AddComponent <Combat>();
        planetInput   = isPlayer ? new PlayerInput(transform) as IPlanetInput: new AIInput(planetCombat);
        planetCombat.InitializePlanetCombat(planetInput, health, rocket, planetShootSpot);
        //set planet mark
        planetColorMark.gameObject.SetActive(true);
        Color markColor = isPlayer ? Color.green : Color.red;

        markColor.a           = 0.5f;
        planetColorMark.color = markColor;
    }