Esempio n. 1
0
    public Monster(FightScene fightScene)
    {
        Hitpoint.Val = 30;

        this.fightScene = fightScene;

        GameObject gObject = GameObject.FindGameObjectsWithTag("Placeholder").Single(o => o.name == "Monster");

        this.renderer = gObject.AddComponent <MonsterRenderer> ();
        this.renderer.Register(this);

        Hitpoint.OnChange += (oldVal, newVal) => {
            if (newVal < oldVal)
            {
                this.renderer.Shake();
            }

            if (newVal <= 0)
            {
                onDeath();
            }
        };

        this.States = new StatesBar(gObject);
    }
Esempio n. 2
0
    public Player(FightScene fightScene)
    {
        this.fightScene = fightScene;
        this.gameStats  = GameObject.FindGameObjectWithTag("GameStatsPersistor")
                          .GetComponent <GameStatsPersistor> ().GameStats;
        // init for Fight Scene
        this.Hitpoint.Val = this.fightScene.GameStats.Hitpoint;
        this.MaxHitpoint  = this.fightScene.GameStats.MaxHitpoint;
        this.Shield.Val   = 0;

        this.Hitpoint.OnChange += (oldVal, newVal) =>
        {
            if (newVal <= 0)
            {
                onDeath();
            }
        };

        this.playerObject   = GameObject.FindGameObjectsWithTag("Placeholder").Single(o => o.name == "Player");
        this.playerRenderer = playerObject.AddComponent <PlayerRenderer>();
        this.playerRenderer.Register(this);

        this.States = new StatesBar(playerObject);
    }
Esempio n. 3
0
 public override void ApplyEffect(StatesBar states)
 {
     states.EnergyModifier = 0;
 }
Esempio n. 4
0
 public override void ApplyEffect(StatesBar states)
 {
     states.ExtraCardsNum += 2;
 }
Esempio n. 5
0
 public virtual void ApplyEffect(StatesBar states)
 {
 }
Esempio n. 6
0
 public void Register(StatesBar states)
 {
     this.states = states;
 }
Esempio n. 7
0
 public override void ApplyEffect(StatesBar states)
 {
     states.DamageModifier *= 0.75f;
 }
Esempio n. 8
0
	public void Awake() {
        this.FightScene = Camera.main.GetComponent<FightScene>();
		this.handObject = this.gameObject;
		this.States = new StatesBar (handObject);
		this.drawPerTurn = this.FightScene.GameStats.GetSpeed();
	}
Esempio n. 9
0
 public override void ApplyEffect(StatesBar states)
 {
     states.AllowDraw = false;
 }
Esempio n. 10
0
 public override void ApplyEffect(StatesBar states)
 {
     states.DamageTookModifier *= 1.5f;
 }