Esempio n. 1
0
 public override void Refresh()
 {
     if (((Eriya)Owner).eriyaMode == EriyaMode.Bot)
     {
         Debug.Log("Bot");
         return;
     }
     base.Refresh();
     if (Control.MainWPAttackLDown())
     {
         SkillSystem.Cast(0);
     }
     if (Control.MainWPAttackRDown())
     {
         SkillSystem.Cast(1);
     }
     if (Control.BackArrowDown())
     {
         //WJ's GrapplingHook Skill
         SkillSystem.Cast(2);
     }
     if (Control.CoreArrowDown())
     {
         //WMC's Flash Skill
         SkillSystem.Cast(3);
     }
     if (Control.ShiftHackDown())
     {
         //WMC's ThroughWallSkill
         SkillSystem.Cast(4);
     }
 }
Esempio n. 2
0
 public Charakter(XmlReader reader, SkillSystem system)
     : base(reader)
 {
     this.system = system;
     this.charakterSchemata = new List<CharakterSchema>();
     read(reader);
 }
    private void Start()
    {
        // RoleMgr.Instance.Mgr<RoleData>().RegisterTask(SS);
        SkillSystem          skillSystem = new SkillSystem();
        SkillEventDispatcher ds          = new SkillEventDispatcher(new SkillEventReceiver());

        // ds.Register("ss", new Action(()=> { }));
        ds.Register <SkillInfo>("ss", SS);

        SkillInstance sk1 = new SkillInstance(1);

        sk1.Name = "11";
        sk1.Triggers.Add(new TriggerFaceToTarget());
        skillSystem.AddToPool(sk1);

        var s1 = skillSystem.GetSkillInstance(1);

        s1.Begin(Time.time);
        SkillInfo s11 = new SkillInfo();

        s11.From = 100;
        s1.Update(Time.time + 1f, s11);

        //    ds.Trigger("ss", new SkillInfo());
        //ds.UnRegister<SkillInfo>("ss", SS);
        //ds.Trigger("ss", new SkillInfo());
    }
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // Create game systems
            InputSystem           = new InputSystem(this);
            NetworkSystem         = new NetworkSystem(this);
            RenderingSystem       = new RenderingSystem(this);
            MovementSystem        = new MovementSystem(this);
            WeaponSystem          = new WeaponSystem(this);
            EnemyAISystem         = new EnemyAISystem(this);
            NpcAISystem           = new NpcAISystem(this);
            GarbagemanSystem      = new GarbagemanSystem(this);
            CollisionSystem       = new Systems.CollisionSystem(this);
            RoomChangingSystem    = new RoomChangingSystem(this);
            QuestLogSystem        = new QuestLogSystem(this);
            SpriteAnimationSystem = new SpriteAnimationSystem(this);
            SkillSystem           = new SkillSystem(this);
            TextSystem            = new TextSystem(this);


            // Testing code.
            LevelManager.LoadContent();
            LevelManager.LoadLevel("D01F01R01");
            //End Testing Code
        }
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // Create game systems
            InputSystem              = new InputSystem(this);
            NetworkSystem            = new NetworkSystem(this);
            RenderingSystem          = new RenderingSystem(this);
            MovementSystem           = new MovementSystem(this);
            WeaponSystem             = new WeaponSystem(this);
            EnemyAISystem            = new EnemyAISystem(this);
            NpcAISystem              = new NpcAISystem(this);
            GarbagemanSystem         = new GarbagemanSystem(this);
            CollisionSystem          = new Systems.CollisionSystem(this);
            RoomChangingSystem       = new RoomChangingSystem(this);
            QuestLogSystem           = new QuestLogSystem(this);
            SpriteAnimationSystem    = new SpriteAnimationSystem(this);
            SkillSystem              = new SkillSystem(this);
            TextSystem               = new TextSystem(this);
            EngineeringOffenseSystem = new EngineeringOffenseSystem(this);
            HUDSystem = new HUDSystem(this);

            InputHelper.Load();
            HUDSystem.LoadContent();

            // Testing code.
            LevelManager.LoadContent();
            LevelManager.LoadLevel("D01F01R01");
            //Song bg = Content.Load<Song>("Audio/Main_Loop");
            //MediaPlayer.Stop();
            //MediaPlayer.IsRepeating = true;
            //MediaPlayer.Play(bg);
            //End Testing Code
        }
 public BeschrankeFertigkeitenVonAttribut(XmlReader reader, SkillSystem system)
     : base(reader)
 {
     attribut = system.getElement<Attribut>(reader.getString("attribut"));
     min = reader.getInt("min");
     max = reader.getInt("max");
 }
Esempio n. 7
0
    /// <summary>
    /// 第二击
    /// </summary>
    public void Two()
    {
        float distance = role.attackDistance + dican;

        List <Role> enemys = new List <Role>();

        foreach (Role go in SpawnManager.Instance.enemyList)
        {
            if (go.Group == role.Group)
            {
                continue;
            }
            if (go.id == role.id)
            {
                continue;
            }
            float temp = Vector3.Distance(go.transform.position, role.transform.position);
            if (temp <= distance)
            {
                enemys.Add(go);
                //distance = temp;
            }
        }
        foreach (Role enemy in enemys)
        {
            Vector3 targetPos = enemy.transform.position;
            targetPos.y = role.transform.position.y;
            role.transform.LookAt(targetPos);
            SkillSystem skill = enemy.GetComponent <SkillSystem>();
            skill.AddOp(OpCode.Demage, role, (int)(role.atk * atk2), (int)KoType.KNOCK_DOWN);
        }
    }
Esempio n. 8
0
 void Update()
 {
     InputSystem.GetInstance().Update();
     PlayerMovementSystem.GetInstance().Update();
     SkillSystem.GetInstance().Update();
     EnemySpawnSystem.GetInstance().Update();
     EnemyMoveSystem.GetInstance().Update();
 }
Esempio n. 9
0
 public static SkillSystem GetInstance()
 {
     if (Instance == null)
     {
         Instance = new SkillSystem();
     }
     return(Instance);
 }
Esempio n. 10
0
 public void CompletedSelectSkill()
 {
     SkillSystem.SetPlayerSkill(selectedSkillList);
     if (this.transform.parent.GetComponent <UI_HeroSelect>() != null)
     {
         this.transform.parent.GetComponent <UI_HeroSelect>().RefreshPlayerSkillUI();
     }
     this.gameObject.SetActive(false);
 }
Esempio n. 11
0
    protected override void Start()
    {
        this.animController = this.GetComponent <HandControlAnimation>();
        p_skillSystem       = this.transform.GetComponent <SkillSystem>();

        this.onHitByMagic += CountDamage;

        InitializePlayer();
    }
Esempio n. 12
0
 void Awake()
 {
     hero          = Instantiate(hero);
     healthSystem  = gameObject.GetComponent <HealthSystem>();
     skillSystem   = gameObject.GetComponent <SkillSystem>();
     buffSystem    = gameObject.GetComponent <BuffSystem>();
     abilitySystem = gameObject.GetComponent <AbilitySystem>();
     //AddRequiredComponents();
 }
Esempio n. 13
0
    public void BasicAttackSpawn()
    {
        Vector3 pos = transform.position + transform.forward;

        pos.y = 1.0f;
        SkillSystem ss = Instantiate(basicAttack, pos, transform.rotation);

        ss.GetComponent <Projectile>().direction = transform.forward;
    }
Esempio n. 14
0
 private void Start()
 {
     HeroSystem.LoadHero();
     SkillSystem.LoadSkill();
     AbilitySystem.LoadAbility();
     ItemSystem.LoadItem();
     MapSystem.LoadMap();
     MissionSystem.LoadMission();
     LocalizationManager.LoadLanguage(User.language);
 }
Esempio n. 15
0
    // Use this for initialization
    void Start()
    {
        Load();
        SkillSystem skillsystem = PlayerManagers.Player.GetComponent <SkillSystem>();

        foreach (int skillId in skillsystem._skillIdList)
        {
            Pickup(skillsystem.GetSkillById(skillId));
        }
    }
Esempio n. 16
0
    public static int GetHeroNeedEnergy(int id, Skill skill)
    {
        HeroData data = userHeros.Find(x => x.id == id || x.id.Equals(id));

        if (data != null && skill != null)
        {
            return(SkillSystem.GetNeedSkillEnergy(skill) - GetHeroStatusSkillEnergy(ref data));
        }
        return(1000);
    }
Esempio n. 17
0
    void Awake()
    {
        InputSystem.GetInstance();
        PlayerMovementSystem.GetInstance();
        SkillSystem.GetInstance();
        EnemySpawnSystem.GetInstance();
        EnemyMoveSystem.GetInstance();

        singletonContainer = transform.GetChild(0).gameObject;
        singletonContainer.AddComponent <InputSingleton>();
    }
        private static SkillSystem LoadSkillSystem()
        {
            const string DataPath = @"C:\Users\robertsona\Documents\Visual Studio 2013\Projects\MabiMaster\MabiMaster\SkillSystem.xml";

            using (FileStream fs = new FileStream(DataPath, FileMode.Open))
            {
                XmlSerializer serializer  = new XmlSerializer(typeof(SkillSystem));
                SkillSystem   SkillSystem = (SkillSystem)serializer.Deserialize(fs);
                return(SkillSystem);
            }
        }
Esempio n. 19
0
    //////////////////////////////////////////////////////////////////////////

    protected override void Start()
    {
        this.onHitByMagic += CountDamage;
        navAgent           = this.GetComponent <NavMeshAgent>();
        target             = GameObject.Find("Player");
        anim           = this.GetComponent <Animator>();
        skillSystem    = this.GetComponent <SkillSystem>();
        animController = this.GetComponent <AiAnimController>();
        defaultSpeed   = navAgent.speed;
        Initialize();
    }
Esempio n. 20
0
 public override void Refresh()
 {
     base.Refresh();
     if (Owner.Interrupt == 0)
     {
         if (Control.SubWPAttackLDown() && Owner.WeaponSystem.skillCasting == null)
         {
             SkillSystem.Cast(0);
         }
     }
 }
Esempio n. 21
0
 void EnableUI()
 {
     if (ScrollContentView != null)
     {
         playerSkillList.Clear();
         selectedSkillList.Clear();
         playerSkillList   = SkillSystem.GetAblePlayerSkillList();
         selectedSkillList = SkillSystem.GetSelectSkillList();
         RefreshUI();
     }
 }
Esempio n. 22
0
 public override void Refresh()
 {
     base.Refresh();
     if (Owner.Interrupt == 0)
     {
         if (Control.MainWPAttackLDown())
         {
             SkillSystem.Cast(0);
             LeftPressed = false;
         }
     }
 }
Esempio n. 23
0
    public static void SetArchivementClearPoint()
    {
        int[] setCheckTypes = { 7, 8, 9, 14, 15 };
        int   point         = 0;

        for (var j = 0; j < setCheckTypes.Length; j++)
        {
            List <Mission> currentMissions = userMissions.FindAll(x => !x.enable && !x.clear && x.clearType == setCheckTypes[j]);
            for (var i = 0; i < currentMissions.Count; i++)
            {
                if (currentMissions[i].missionType == 2)
                {
                    switch (currentMissions[i].clearType)
                    {
                    case 7:
                        point = User.level;
                        break;

                    case 8:
                        point = 0;
                        foreach (var hero in HeroSystem.GetUserHeros())
                        {
                            point += hero.level;
                        }
                        break;

                    case 9:
                        point = User.flatEnergyMaxLevel + User.flatEnergyChargingLevel + User.addMoneyLevel + User.addExpLevel + User.addAttackLevel + User.addDefenceLevel;
                        break;

                    case 14:
                        point = 0;
                        foreach (var skill in SkillSystem.GetPlayerSkillList())
                        {
                            point += SkillSystem.GetUserSkillLevel(skill.id);
                        }
                        break;

                    case 15:
                        point = 0;
                        foreach (var skill in SkillSystem.GetUserHerosSkills())
                        {
                            point += SkillSystem.GetUserSkillLevel(skill.id);
                        }
                        break;
                    }
                    currentMissions[i].point = point;
                    Debugging.Log(MissionSystem.GetMissionName(currentMissions[i].id) + " 의 포인트 > " + point);
                }
            }
        }
        Debugging.Log("업적 세팅타입 설정완료");
    }
Esempio n. 24
0
 public void OnClickSkillUpgrate(int index, int skillId, int payment)
 {
     if (Common.PaymentCheck(ref User.blackCrystal, payment))
     {
         SoundManager.instance.EffectSourcePlay(AudioClipManager.instance.ui_pop);
         SkillSystem.SetObtainSkill(skillId);
         EffectManager.SkillUpgradeEffect(ScrollContentView.transform.GetChild(index).GetChild(0).transform);
         RefreshUI();
     }
     else
     {
         UI_Manager.instance.ShowAlert(UI_Manager.PopupAlertTYPE.blackCrystal, payment);
     }
 }
Esempio n. 25
0
    public void SetSkill()
    {
        Skill data = SkillSystem.GetSkill(skillId);

        skillType        = (SkillType)data.skillType;
        applyType        = (ApplyType)data.targetType;
        skillName        = data.name;
        skillDescription = data.description;
        skillLevel       = SkillSystem.GetUserSkillLevel(skillId);
        skillAbillity    = SkillSystem.GetUserSkillPower(skillId);
        skillDelayTime   = data.energy;
        skillImage       = SkillSystem.GetSkillImage(skillId);
        Debugging.Log(skillId + " 스킬 세팅완료");
    }
Esempio n. 26
0
 public void OnSkillLevelUpClick(int skill, int needMoney)
 {
     if (Common.PaymentCheck(ref User.coin, needMoney))
     {
         SoundManager.instance.EffectSourcePlay(AudioClipManager.instance.ui_pop);
         EffectManager.SkillUpgradeEffect(skillImage.transform);
         SkillSystem.SetObtainSkill(skill);
         RefreshHeroStatusEquipmentPanel();
     }
     else
     {
         UI_Manager.instance.ShowAlert(UI_Manager.PopupAlertTYPE.coin, needMoney);
     }
 }
Esempio n. 27
0
    public void OpenUI(HeroData data)
    {
        heroData    = data;
        showHeroObj = Instantiate(PrefabsDatabaseManager.instance.GetHeroPrefab(heroData.id), ShowPoint.transform);
        showHeroObj.transform.localScale    = new Vector3(200, 200, 200);
        showHeroObj.transform.localPosition = Vector3.zero;

        if (showHeroObj.GetComponent <Hero>() != null)
        {
            Destroy(showHeroObj.GetComponent <Hero>());
        }
        if (showHeroObj.GetComponent <Rigidbody2D>() != null)
        {
            Destroy(showHeroObj.GetComponent <Rigidbody2D>());
        }
        foreach (var sp in showHeroObj.GetComponentsInChildren <SpriteRenderer>())
        {
            sp.sortingLayerName = "ShowObject";
            sp.gameObject.layer = 16;
        }
        showHeroObj.gameObject.SetActive(true);

        nameText.text        = HeroSystem.GetHeroName(data.id);
        descriptionText.text = HeroSystem.GetHeroDescription(data.id);

        //Status 정보
        if (statusInfoPanel != null)
        {
            statusInfoPanel.transform.GetChild(0).GetComponentInChildren <Text>().text = HeroSystem.GetHeroStatusAttack(ref heroData).ToString();
            statusInfoPanel.transform.GetChild(1).GetComponentInChildren <Text>().text = HeroSystem.GetHeroStatusDefence(ref heroData).ToString();
            statusInfoPanel.transform.GetChild(2).GetComponentInChildren <Text>().text = HeroSystem.GetHeroStatusMaxHp(ref heroData).ToString();
            statusInfoPanel.transform.GetChild(3).GetComponentInChildren <Text>().text = HeroSystem.GetHeroStatusCriticalPercent(ref heroData).ToString();
            statusInfoPanel.transform.GetChild(4).GetComponentInChildren <Text>().text = HeroSystem.GetHeroStatusAttackSpeed(ref heroData).ToString();
            statusInfoPanel.transform.GetChild(5).GetComponentInChildren <Text>().text = HeroSystem.GetHeroStatusMoveSpeed(ref heroData).ToString();
            statusInfoPanel.transform.GetChild(6).GetComponentInChildren <Text>().text = HeroSystem.GetHeroStatusKnockbackResist(ref heroData).ToString("N1");
            statusInfoPanel.transform.GetChild(7).GetComponentInChildren <Text>().text = HeroSystem.GetHeroStatusSkillEnergy(ref heroData).ToString();
        }

        // 스킬정보
        Skill heroSkill = SkillSystem.GetSkill(heroData.skill);

        if (skillInfoPanel != null && heroSkill != null)
        {
            var skillImage = skillInfoPanel.transform.GetChild(0).GetChild(0).GetComponent <Image>();
            skillImage.sprite = SkillSystem.GetSkillImage(heroSkill.id);
            skillInfoPanel.transform.GetComponentInChildren <Text>().text = string.Format("<size='27'>{0} : {1}  {2}</size>\r\n\r\n<color='grey'>{3}</color>", LocalizationManager.GetText("SkillLevel"), 1, SkillSystem.GetSkillName(heroSkill.id), SkillSystem.GetSkillDescription(heroSkill.id));
        }
    }
Esempio n. 28
0
 /// <summary>
 /// 初始化技能对象属性
 /// </summary>
 public void Init(Role role)
 {
     this.role          = role;
     this.animator      = role.GetComponent <Animator>();
     this.skill         = role.GetComponent <SkillSystem>();
     this.Name          = GetName();
     this.Id            = GetId();
     this.Cd            = GetCd();
     this.SkillType     = GetSkillType();
     this.Hp            = GetHp();
     this.Mp            = GetMp();
     this.attackLock    = role.GetComponent <AttackLock>();
     this.equipmentShow = role.GetComponent <EquipmentShow>();
     this.TimeNodeList  = new List <TimeNode>();
     Effect_Init();
 }
Esempio n. 29
0
    public static void SetObtainHero(int id)
    {
        HeroData obtainHero = heros.Find(h => h.id == id || h.id.Equals(id));

        if (obtainHero != null)
        {
            HeroDatabase.AddUser(id);
            userHeros.Add(obtainHero);
            SkillSystem.SetObtainSkill(obtainHero.skill);
            MissionSystem.AddClearPoint(MissionSystem.ClearType.CollectHero);
            Debugging.Log(id + " 영웅 획득 성공!");
        }
        else
        {
            Debugging.LogError("획득할 영웅을 찾지못함 >> " + id);
        }
    }
Esempio n. 30
0
    public void RefreshPlayerSkillUI()
    {
        List <Skill> playerSkillList = SkillSystem.GetSelectSkillList();

        for (int i = 0; i < playerSkillList.Count; i++)
        {
            if (playerSkillList[i] != null)
            {
                playerSkillPanel.transform.GetChild(i).GetChild(0).GetComponent <Image>().enabled = true;
                playerSkillPanel.transform.GetChild(i).GetChild(0).GetComponent <Image>().sprite  = SkillSystem.GetSkillImage(playerSkillList[i].id);
            }
        }
        for (int i = playerSkillList.Count; i < 2; i++)
        {
            playerSkillPanel.transform.GetChild(i).GetChild(0).GetComponent <Image>().enabled = false;
        }
    }
Esempio n. 31
0
 public override void Refresh()
 {
     base.Refresh();
     if (Owner.Interrupt == 0)
     {
         if (Control.CoreArrowDown())
         {
             SkillSystem.Cast(0);
             LeftPressed = false;
         }
         //if (Control.MainWPAttackRPress())
         //{
         //    SkillSystem.Cast(1);
         //    LeftPressed = false;
         //}
     }
 }
Esempio n. 32
0
    public static void AddSkill(int id)
    {
        string      path   = Application.persistentDataPath + "/Xml/Skill.Xml";
        XmlDocument xmlDoc = new XmlDocument();

        if (System.IO.File.Exists(path))
        {
            xmlDoc.LoadXml(System.IO.File.ReadAllText(path));
        }

        //복호화////
        XmlElement elmRoot     = xmlDoc.DocumentElement;
        var        decrpytData = DataSecurityManager.DecryptData(elmRoot.InnerText);

        elmRoot.InnerXml = decrpytData;
        //////////
        CreateNode(SkillSystem.GetSkill(id), xmlDoc, path);
    }
Esempio n. 33
0
 public Charakter(string name, string desc, string img, SkillSystem system)
     : base(name, desc, img, DateTime.Now)
 {
     this.system = system;
     this.charakterSchemata = new List<CharakterSchema>();
 }
 public AddierSammlungAufFertigkeiten(XmlReader reader, SkillSystem system)
     : base(reader)
 {
     this.sammlung = system.getElement<Sammlung>(reader.getString("sammlung"));
 }
 public AddierFertigkeitenAufAttribut(XmlReader reader, SkillSystem system)
     : base(reader)
 {
     this.attribut = system.getElement<Attribut>(reader.getString("attribut"));
 }
 public AddierAttributAufFertigkeiten(XmlReader reader, SkillSystem system)
     : base(reader)
 {
     this.rate = reader.getInt("rate");
     this.attribut = system.getElement<Attribut>(reader.getString("attribut"));
 }
Esempio n. 37
0
 public EigenschaftsWahl(XmlReader reader, SkillSystem system)
     : base(reader)
 {
     sammlung = system.getElement<Sammlung>(reader.getString("sammlung"));
     min = reader.getInt("min");
     max = reader.getInt("max");
 }