Noooo, wtedy w klasie Creatures będziesz miał obiekt, jak będziesz miał obiekt to będziesz mógł wywołać jego metodę, a czy to nie jest rozwiązanie problemu?
public HealthBar zycie;
zycie = new HealthBar (s_Object);
zycie.Create ();
public int Health
{
get
{
return health;
}
set
{
this.health = value;
zycie.arkam();
}
}
private int _health;
public int Health
{
get
{
return _health;
}
set
{
if(_health != value)
{
_health = value;
zycie.arkam();
}
}
}
public virtual void FillStatistics()
{
Debug.Log("ERROR: Fill the statistics of " + this.name); // tu bedzie critic error pozniej
}
public override void FillStatistics()
{
this.Mana = 200;
this.SpecialAttackPoints = 0;
this.Sila = 1;
this.Magic = 1;
this.Agility = 1;
this.Defense = 1;
this.Position = new Vector3 (0, -1, 0);
this.Outfit = 1;
}
Ostatnio zmieniony przez Mickey Mouse : 06-08-2015, 05:16
public Player(string Name)
{
this.Mana = 200;
this.SpecialAttackPoints = 0;
this.Sila = 1;
this.Magic = 1;
this.Agility = 1;
this.Defense = 1;
this.Position = new Vector3(0, -1, 0);
this.Outfit = 1;
}
public Creature()
{
this.maxHealth = 155;
this.health = this.MaxHealth;
}
Ostatnio zmieniony przez Mickey Mouse : 06-08-2015, 23:22
Dreaming by drumming. ™
Aktualnie 1 użytkowników przegląda ten temat. (0 użytkowników i 1 gości)
Zakładki