Esempio n. 1
0
 // Start is called before the first frame update
 void Start()
 {
     CombatEntity = EntityFactory.Create <CombatEntity>();
     CombatEntity.Initialize();
     CombatEntity.AddComponent <CombatSkillComponent>();
     AnimTimer.MaxTime = AnimTime;
 }
Esempio n. 2
0
    // Start is called before the first frame update
    void Start()
    {
        CombatEntity = EntityFactory.Create <CombatEntity>();
        CombatEntity.Initialize();
        CombatEntity.AddListener(ActionPointType.PostReceiveDamage, OnReceiveDamage);
        CombatEntity.AddListener(ActionPointType.PostReceiveCure, OnReceiveCure);

        var config   = Resources.Load <SkillConfigObject>("SkillConfigs/Skill_1004_坚韧");
        var abilityA = CombatEntity.AttachSkill <PassiveSkill1004Entity>(config);
    }
Esempio n. 3
0
    public void SpawnEntity(CharacterBaseStats baseStats, int position)
    {
        GameObject   gObj       = Instantiate(combatEntityPrefab, enemyPositionsOnWorld[position].transform.position, Quaternion.identity);
        CombatEntity entity     = gObj.GetComponent <CombatEntity>();
        EntityData   entityData = new EntityData(baseStats);

        entity.Initialize(entityData);
        teams[entity.TeamID].Add(entity);
        entitiesInCombat.Add(entity);
        controllers.Add(gObj.GetComponent <Controller>());
    }
Esempio n. 4
0
    // Start is called before the first frame update
    void Start()
    {
        CombatEntity = EntityFactory.Create <CombatEntity>();
        CombatEntity.Initialize();
        CombatEntity.AddComponent <AbilityPreviewComponent>();

        var config   = Resources.Load <SkillConfigObject>("SkillConfigs/Skill_1001_黑火球术");
        var abilityA = CombatEntity.AttachSkill <Skill1001Entity>(config);

        CombatEntity.BindAbilityInput(abilityA, KeyCode.Q);

        AnimTimer.MaxTime = AnimTime;
    }
Esempio n. 5
0
    public void SpawnPlayer(PlayerCharacter playerChar)
    {
        GameObject   gObj   = Instantiate(playerEntityPrefab);
        CombatEntity entity = gObj.GetComponent <CombatEntity>();

        entity.Initialize(playerChar.entityStats);
        teams[entity.TeamID].Add(entity);
        entitiesInCombat.Add(entity);
        Controller controller = gObj.GetComponent <Controller>();

        if (controller is PlayerController pController)
        {
            playerController = pController;
            uiManager.currentMainCharacter = entity;
        }
        controllers.Add(controller);
    }
Esempio n. 6
0
 // Start is called before the first frame update
 void Start()
 {
     CombatEntity = new CombatEntity();
     CombatEntity.Initialize();
     CombatEntity.AddListener(CombatActionType.CauseDamage, OnReceiveDamage);
 }
Esempio n. 7
0
 // Start is called before the first frame update
 void Start()
 {
     CombatEntity = Entity.Create <CombatEntity>();
     CombatEntity.Initialize();
     CombatEntity.AddListener(CombatActionType.ReceiveDamage, OnReceiveDamage);
 }
Esempio n. 8
0
 // Start is called before the first frame update
 void Start()
 {
     CombatEntity = EntityFactory.Create <CombatEntity>();
     CombatEntity.Initialize();
     CombatEntity.AddListener(ActionPointType.PostReceiveDamage, OnReceiveDamage);
 }
Esempio n. 9
0
 // Start is called before the first frame update
 void Start()
 {
     CombatEntity = new CombatEntity();
     CombatEntity.Initialize();
     AnimTimer.MaxTime = AnimTime;
 }