示例#1
0
    public void ReplaceChooseNinjaItemInfo(AllocationNinjaItem newValue)
    {
        var index     = GameComponentsLookup.ChooseNinjaItemInfo;
        var component = (ChooseNinjaItemInfoComponent)CreateComponent(index, typeof(ChooseNinjaItemInfoComponent));

        component.value = newValue;
        ReplaceComponent(index, component);
    }
    public void OnChooseNinjaItemInfo(GameEntity entity, AllocationNinjaItem value)
    {
        var toggleGroup = GameObject.Find("ChooseNinjaWindowNinjaList").GetComponent <ToggleGroup>();
        var toggle      = GetComponent <Toggle>();

        toggle.group = toggleGroup;

        var headShot = transform.Find("Background/NinjaHeadShot").GetComponent <Image>();

        headShot.sprite = Resources.Load <Sprite>("Image/UI/HeadShot/" + value.ninjaName + "HeadShot");

        //entity.ReplaceName(value.ninjaName);
    }