Example #1
0
    public void ReplaceTarget(ExcelConfig.CharacterData data, bool stay, bool ai)
    {
        var magics = ExcelToJSONConfigManager
                     .Current.GetConfigs <CharacterMagicData>(t => t.CharacterID == data.ID).ToList();

        if (!stay)
        {
            this.target.SubHP(this.target.HP);
        }
        var per    = curState.Perception as BattlePerception;
        var scene  = UPerceptionView.Singleton.UScene;
        var target = per.CreateCharacter(1, data, magics, 2,
                                         new UVector3(scene.enemyStartPoint.position.x,
                                                      scene.enemyStartPoint.position.y, scene.enemyStartPoint.position.z),
                                         new UVector3(0, -90, 0), -1);;

        if (ai)
        {
            per.ChangeCharacterAI(data.AIResourcePath, target);
        }
        this.target = target;
    }
Example #2
0
        //private float targetPoint;

        private void OnClick(ExcelConfig.CharacterData data)
        {
            //ExcelConfig.CharacterData data =null;
        }