Exemplo n.º 1
0
        private void GenerateEvents()
        {
            int chance = theRandom.Next(0, 100);

            if (chance < Configuration.EVENT_CHANCE)
            {
                IWorldEvent worldEvent = EventFactory.GenerateRandomEvent();
                worldEvent.ActOnWorld(World);
            }
        }
Exemplo n.º 2
0
    public void IControlUpdate()
    {
        manager.modeStringEnum = GameManager.ModeString.View_Mode;

        if (control.LB() && softSelected)
        {
            ignore.Add(softSelected);
        }

        if (control.RB())
        {
            if (softSelected)
            {
                PickupSelected();
                WorldBuilderMain.ChoosePlaceMode();
            }
            return;
        }

        if (control.RHY() != 0)
        {
            Vector3 pos = manager.pointerGroup.localPosition;
            pos.y -= control.RHY() * Time.deltaTime / 4f;
            pos.z += control.RHY() * Time.deltaTime / 4f;
            manager.pointerGroup.localPosition = pos;
        }


        if (control.RB2())
        {
            if (softSelected)
            {
                if (TODV2.GetItemByID(softSelected.GetComponent <DioramaObject>().todID).hasAnimation)
                {
                    PickupSelected();
                    PoserMode.Instance().SetupMode();
                    return;
                }

                IWorldEvent iwe = softSelected.GetComponent <IWorldEvent>();
                if (iwe != null)
                {
                    iwe.StartEvent(WorldBuilderMain.Instance());
                    return;
                }
            }
        }
    }