Exemplo n.º 1
0
 private void AfterUpdate()
 {
     CurrentComponent.UpdateInfo();
     ChangeModInfo();
     updateFinished      = false;
     updating            = false;
     updateSprite.Hidden = true;
 }
 private Component FindComponent(string from, bool inherit, Type componentType)
 {
     if (string.IsNullOrEmpty(from))
     {
         return(CurrentComponent.GetComponent(componentType, inherit));
     }
     else
     {
         return(Entity.Find(from)?.GetComponent(componentType, inherit));
     }
 }
Exemplo n.º 3
0
    int GetSlotState(Transform slot)
    {
        Transform CurrentComponent;

        if (slot.transform.childCount != 0)
        {
            CurrentComponent = slot.transform.GetChild(0); //Grabs the first child (which should be the only child)
            return(CurrentComponent.GetComponent <ComponentBehavior>().State);
        }
        else
        {
            return(0);
        }
    }
Exemplo n.º 4
0
    int[] GetSlotAttributes(Transform slot)
    {
        Transform CurrentComponent;

        if (slot.transform.childCount != 0)
        {
            CurrentComponent = slot.transform.GetChild(0); //Grabs the first child (which should be the only child)
            return(CurrentComponent.GetComponent <ComponentBehavior>().Attributes);
        }
        else
        {
            return(null);
        }
    }
Exemplo n.º 5
0
 private void OnKeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Down || e.KeyCode == Keys.Up)
     {
         CurrentComponent.Value.Selected = false;
         if (e.KeyCode == Keys.Down)
         {
             CurrentComponent = CurrentComponent.NextOrFirst();
         }
         else if (e.KeyCode == Keys.Up)
         {
             CurrentComponent = CurrentComponent.PreviousOrLast();
         }
         CurrentComponent.Value.Selected = true;
     }
 }
Exemplo n.º 6
0
 [Given(@"I add class (.*)")] public void AddClass(string className)
 {
     CurrentComponent.AddCssClass(className);
 }
Exemplo n.º 7
0
 [Given(@"I remove class (.*)")] public void RemoveClass(string className)
 {
     CurrentComponent.RemoveCssClass(className);
 }