Exemple #1
0
    private void Start()
    {
        myAbilities = new AbilityBall.Abilities[3];
        int id = NetworkManager.instance ? NetworkManager.instance.GetId() : 0;

        if (NetworkStoredData.instance)
        {
            myAbilities[0] = (AbilityBall.Abilities)(NetworkStoredData.instance.GetOffenseAbility(id) + 1);
            myAbilities[1] = (AbilityBall.Abilities)(NetworkStoredData.instance.GetDefenseAbility(id) + 3);
        }
        else
        {
            myAbilities[0] = AbilityBall.Abilities.iceBall;
            myAbilities[1] = AbilityBall.Abilities.shieldBall;
        }


        myAbilities[2] = AbilityBall.Abilities.storageBall;

        playerMove      = GetComponent <PlayerMovement>();
        gcController    = GetComponent <GolfClubController>();
        playerAnimation = GetComponent <PlayerAnimation>();
        //canvController = GameObject.Find("Canvas").GetComponent<CanvasController>();

        EventController.FireEvent(new InitializeAbilityBall(myAbilities[0], id));
        EventController.FireEvent(new InitializeAbilityBall(myAbilities[1], id));
        //Storage ball always needs their event fired last with the current system
        //We may need to refactor this later
        EventController.FireEvent(new InitializeAbilityBall(myAbilities[2], id));

        //
    }
 static void Main(string[] args)
 {
     GolfClubManager.Controllers.GolfClubController gc = new GolfClubController();
     gc.Run();
 }