public void Initialize(NinjaBehaviour.NinjaColor ninjaColor, bool useNetwork)
 {
     this.noNetwork = !useNetwork;
     this.color     = ninjaColor;
     this.health    = maxHealth;
     this.score     = 0;
 }
    private NinjaBehaviour CreateNinja(NinjaBehaviour.NinjaColor color, Vector3 position, bool instantiateOnNetwork)
    {
        Debug.Log("Creating " + color + " local");
        NinjaBehaviour ninja = FlexiInstantiate <NinjaBehaviour>(ninjaCharacter, position, Quaternion.identity, instantiateOnNetwork);

        ninja.Initialize(color, instantiateOnNetwork);
        GetComponent <GlobalGameState>().SetFightingState();
        return(ninja);
    }
Example #3
0
    public void SetScore(NinjaBehaviour.NinjaColor color, int score)
    {
        switch (color)
        {
        case NinjaBehaviour.NinjaColor.Black:
            whiteScore = score;
            break;

        case NinjaBehaviour.NinjaColor.White:
            blackScore = score;
            break;
        }
    }
Example #4
0
    public void SetHealth(NinjaBehaviour.NinjaColor color, int health)
    {
        switch (color)
        {
        case NinjaBehaviour.NinjaColor.Black:
            blackHealth = health * 10;
            break;

        case NinjaBehaviour.NinjaColor.White:
            whiteHealth = health * 10;
            break;
        }
    }