private void RegisterPucksWithUI(PuckMasterPlayer player, UI_PuckStatus[] pucksText)
    {
        var pucks = player.GetPucks();

        for (var i = 0; i < pucks.Length; i++)
        {
            pucksText[i].RegisterPuck(pucks[i]);
        }
    }
Beispiel #2
0
 public void Initialise(PuckMasterPlayer _player, PointAndShoot _puck)
 {
     puck   = _puck;
     player = _player;
     foreach (var abstractSpecial in specials)
     {
         abstractSpecial.Initialise(_player, _puck);
     }
 }
    // Use this for initialization
    void Start()
    {
        _pmgm    = FindObjectOfType <PuckMasterGameManager>();
        _player1 = _pmgm.GetPlayerWithTag("Player1");
        _player2 = _pmgm.GetPlayerWithTag("Player2");

        RegisterPucksWithUI(_player1, Player1Pucks);
        RegisterPucksWithUI(_player2, Player2Pucks);
        Player1Avatar.RegisterPlayer(_player1);
        Player2Avatar.RegisterPlayer(_player2);
    }
Beispiel #4
0
    public override void Initialise(PuckMasterPlayer _player, PointAndShoot _puck)
    {
        player = _player;
        puck   = _puck;

        if (active)
        {
            var spawnPos = new Vector3(transform.position.x, transform.position.y, 1);
            var obj      = Instantiate(puckBloom, spawnPos, transform.rotation);
            obj.transform.parent = gameObject.transform;
            obj.GetComponent <SpriteRenderer>().color = _player.GetPlayerColor();
        }
    }
 public void RegisterPlayer(PuckMasterPlayer pmp)
 {
     _player = pmp;
 }
Beispiel #6
0
    /*
     * Mutation events
     */

    public void Initialise(PuckMasterPlayer _player)
    {
        _special.Initialise(_player, this);
        _triggerPuckZoom.Initialise(this);
        this.tag = _player.tag;
    }
Beispiel #7
0
 public override void Initialise(PuckMasterPlayer _player, PointAndShoot _puck)
 {
     player = _player;
     puck   = _puck;
 }
Beispiel #8
0
 public abstract void Initialise(PuckMasterPlayer _player, PointAndShoot _puck);