Esempio n. 1
0
    /// <summary>
    /// 获取技能对应的特效 及buff数据
    /// </summary>
    protected void effectAndBuffData()
    {
        // 获取特效数据
        EffectAngent effect = new EffectAngent();

        effect.setData(_agent.getEffectID());

        _effectDict.Add(_agent.getID(), effect);

        // 获取buff
        BuffAgent buffAge = new BuffAgent();
        buffAge.setData(_agent.getBuffID());
        _buff.Add(_agent.getID(), buffAge);
    }
Esempio n. 2
0
    /// <summary>
    /// 获取技能对应的特效 及buff数据
    /// </summary>
    protected void effectAndBuffData()
    {
        // 获取特效数据
        EffectAngent effect = new EffectAngent();

        effect.setData(_agent.getEffectID());

        _effectDict.Add(_agent.getID(), effect);


        // 获取buff
        BuffAgent buffAge = new BuffAgent();

        buffAge.setData(_agent.getBuffID());
        _buff.Add(_agent.getID(), buffAge);
    }
Esempio n. 3
0
    //-----------------------------------------------------------------------
    // Private Function
    //-----------------------------------------------------------------------

    private void Init()
    {
        rb          = GetComponent <Rigidbody>();
        StateHandle = new IdleState(this);
        buffAgent   = new BuffAgent(this);

        for (int i = 0; i < PlayerManager.Instance.players.Count; i++)
        {
            if (!PlayerManager.Instance.players[i].isSpawned)
            {
                PlayerManager.Instance.players[i].isSpawned = true;

                ///設定控制器
                if (PlayerManager.Instance.players[i].controllerType == ControllerType.Keyboard1 ||
                    PlayerManager.Instance.players[i].controllerType == ControllerType.Keyboard2)
                {
                    controller = new KeyboardController(PlayerManager.Instance.players[i].controllerType);
                }
                else
                {
                    controller = new JoystickController(PlayerManager.Instance.players[i].controllerType);
                }

                ///設定模組顏色
                switch (PlayerManager.Instance.players[i].color)
                {
                case ColorType.Red:
                    RedBody.SetActive(true);
                    break;

                case ColorType.Blue:
                    BlueBody.SetActive(true);
                    break;

                case ColorType.Yellow:
                    YellowBody.SetActive(true);
                    break;

                case ColorType.Green:
                    GreenBody.SetActive(true);
                    break;
                }
                break;
            }
        }
    }