Exemplo n.º 1
0
        public bool Equals(Wrapper p)
        {
            // If parameter is null return false:
            if ((object)p == null)
            {
                return false;
            }

            // Return true if the fields match:
            return m_nickname == p.m_nickname;
        }
Exemplo n.º 2
0
        public void SetPlayer(Wrapper player)
        {
            m_player = player;
            m_isWalking = false;
            m_haveRolled = false;

            if (m_player == null) {
                Debug.Log("MIERDA");
                Debug.Break();
            } else {
                Debug.Log("NOMBRE "+ m_player.GetNickname() + " --- BOXES... " + Manager.Board.Instance.Get().Count );
            }

            // TODO: Spawn puppet, configure puppet materials (colors), etc
            int position = m_player.GetStats().GetPosition();
            Debug.Log("POSITION " + position );
            Board.Box box = Manager.Board.Instance.GetPositioned(position);

            this.SetBox(box);
            this.transform.position = box.GetWaypoint();
            m_box.AddPuppetInsideBox(this);
        }
Exemplo n.º 3
0
    /// <summary>
    /// Obtain current player wrapper, if it doesn't exist, it creates a new
    /// one.
    /// </summary>
    /// <returns>Current player wrapper</returns>
    private Player.Wrapper GetCurrentPlayerObject()
    {
        if (m_currentPlayerObject == null)
            m_currentPlayerObject = new Player.Wrapper();

        return m_currentPlayerObject;
    }
Exemplo n.º 4
0
    /// <summary>
    /// Adds current player wrapper to the player manager and resets all
    /// current player's configuration to default values.
    /// </summary>
    private void AddCurrentPlayerObjectToPlayerManager()
    {
        // Add current player to player manager
        Manager.Player.Instance.Add(m_currentPlayerObject);

        // Reset all player configs for new player
        m_currentPlayerObject = null;

        // Add new player to configurate, even if there are no more players
        GetCurrentPlayerObject();
    }
Exemplo n.º 5
0
    public void Start()
    {
        m_currentPlayersChoice        = Manager.Player.Instance.Get().Count;
        m_currentPlayerObject         = null;
        m_inputKeyIsBeingConfigurated = -1;

        CharacterPhase.SetActive(false);
        InputPhase.SetActive(false);
    }
Exemplo n.º 6
0
        /// <summary>
        /// MonoBehaviour Start()
        /// </summary>
        void Start()
        {
            // Set player wrapper
            m_player = SetPlayer();

            // Initialize score
            m_score = 0;

            // Custom OnStart() method
            OnStart();
        }