// 注册组
    protected void  resist_item_to_group(string group_name, Botan.ItemBase item)
    {
        Botan.Group group = this.findGroup(group_name);

        if (group == null)
        {
            group = this.default_group;
        }
        group.items.Add(item);

        item.group_name = group_name;
    }
    // ================================================================ //
    // 继承于MonoBehaviour

    void    Awake()
    {
        this.groups = new List <Botan.Group>();

        this.default_group = new Botan.Group();

        this.default_group.name = "@default";

        this.groups.Add(this.default_group);

        this.input.enable            = true;
        this.input.mouse_position    = Input.mousePosition;
        this.input.button.trigger_on = false;
        this.input.button.current    = false;
    }
    // ================================================================ //

    // 创建组
    public Botan.Group      createGroup(string name)
    {
        Botan.Group group = null;

        group = this.findGroup(name);

        if (group == null)
        {
            group      = new Botan.Group();
            group.name = name;

            this.groups.Add(group);
        }

        return(group);
    }
Exemplo n.º 4
0
    // ================================================================ //
    // MonoBehaviour からの継承.

    void    Awake()
    {
        this.groups = new List <Botan.Group>();

        this.default_group = new Botan.Group();

        this.default_group.name = "@default";

        this.groups.Add(this.default_group);

        this.input.enable            = true;
        this.input.mouse_position    = Input.mousePosition;
        this.input.button.trigger_on = false;
        this.input.button.current    = false;

        this.audio_source = this.gameObject.AddComponent <AudioSource>();
    }