public void Init()
 {
     _move.Init();
     ThisView.Init();
     ThisData.Init();
     ThisActionUnit.Init();
     OnMove(0f, MoveType.STOP);
 }
 public void Update(float delta)
 {
     if (_move.HaveSpeed)
     {
         ThisView.Move(delta, _move.forwardSpeed, _move.Forward);
     }
     ThisView.UpdateRotate(delta);
 }
 public void Release()
 {
     TickerManager.Instance.RemoveFixedTick(this);
     TickerManager.Instance.RemoveTick(this);
     Init();
     ThisConfig = null;
     ThisActionUnit.Release();
     ThisView.Release();
 }
        public override UnitView SetView(Transform parent = null)
        {
            var prefab = GameCore.GetModel <SettingsModel>().GameSettings.GetPefab <UnitView>();

            ThisView      = Object.Instantiate(prefab, parent);
            ThisView.name = $"Circle {UnitId}";
            ThisView.SetModel(this);
            SetupUnit();
            return(View);
        }
        public AreaView SetView(Transform parent)
        {
            var prefab = GameCore.GetModel <SettingsModel>().GameSettings.GetPefab <AreaView>();

            ThisView = Object.Instantiate(prefab, parent);
            ThisView.SetModel(this);
            ConstructArea();
            _unitsRoot = new GameObject(UNITS_ROOT_NAME).transform;
            return(View);
        }
 public void ChangeCharacter(uint roleID)
 {
     if (ThisConfig == null || ThisConfig.characterID != roleID)
     {
         CharacterConfig config = CharacterConfigManager.Instance.GetCharacterConfig(roleID);
         if (config != null)
         {
             ThisView.ChangeView(config.resName, config);
             ThisConfig = config;
         }
         else
         {
             return;
         }
     }
     ThisActionUnit.ChangeAction(CharacterAction.IDLE, true);
     Init();
 }
示例#7
0
 protected void SetInput(string value)
 {
     if (value == null)
     {
         Filled = false;
     }
     else if (value.Equals(""))
     {
         Filled = false;
     }
     else
     {
         if (ThisItem != null)
         {
             ThisItem.Input = value;
         }
         Filled = true;
         if (ThisView != null)
         {
             ThisView.CheckAllItemsFilled(ThisItem.AskBeforeActivity);
         }
     }
 }