Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        m_enemyMgr = EnemyManager.Get();
        m_battleMgr = BattleManager.Get();
        m_handler = Service.Get<HUDService>().HUDControl;
        m_inputMgr = InputManager.Get();

        // Initialize base value of player
        m_player = new PlayerStats();
        m_player.atk = 10;
        m_player.hp = 100;
        m_player.bravebar = 0;

        m_skills = new Skill[3];
        m_skills[0].name = "Punch";
        m_skills[0].energyCost = 1;
        m_skills[0].dmg = 4.7f;
        m_skills[0].id = 1;
        m_skills[1].name = "Kick";
        m_skills[1].energyCost = 2;
        m_skills[1].dmg = 9.0f;
        m_skills[1].id = 2;
        m_skills[2].name = "Strike A Pose";
        m_skills[2].energyCost = 4;
        m_skills[2].dmg = 19.0f;
        m_skills[2].id = 3;

        //Create Skill Buttons

        m_camService = Service.Get<MapService>();
        m_camService.Init();

        if(m_handler != null)
        {
            m_handler.AddActionButton("NormalAttack", this.gameObject, m_skills[0]);
            m_handler.AddActionButton("NormalAttack", this.gameObject, m_skills[1]);
            m_handler.AddActionButton("NormalAttack", this.gameObject, m_skills[2]);

            m_handler.InitializeGauge((int)GAUGE.PLAYER, m_player.hp, m_player.hp, "Ellie");
        }

        //		l2dInterface.LoadProfile ();

        l2dInterface.GetModel ().StopBasicMotion (true);
        l2dInterface.PlayCombatIdleAnim ();

        m_soundService = Service.Get<SoundService>();
    }