Exemplo n.º 1
0
    protected void Awake()
    {
        DoneOnce = JunkerGameMode.HasDoneStoryPart(EventChain.name);

        var clawTarget = GetComponent <ClawTarget>();

        if (clawTarget == null)
        {
            return;
        }

        clawTarget.SetLightsVisible(DoOnce == true && DoOnce != DoneOnce || DoOnce == false);

        switch (eventTrigger)
        {
        case E_EventTrigger.OnClawConnect:
            clawTarget.OnClawConnect += Add;
            break;

        case E_EventTrigger.OnShipDocked:
            clawTarget.OnShipDocked += Add;
            break;

        case E_EventTrigger.OnShipUnDocked:
            clawTarget.OnShipUnDocked += Add;
            break;

        default:
            break;
        }
    }
Exemplo n.º 2
0
    public void Add()
    {
        if (DoOnce == true && DoOnce == DoneOnce)
        {
            return;
        }


        if (DoOnce == true)
        {
            JunkerGameMode.FinishedStoryPart(EventChain.name);

            DoneOnce = true;
        }

        if (EventChain != null)
        {
            foreach (GameEvent item in EventChain.eventChain)
            {
                EventManager.AddEvent(item);
            }
        }
        if (DoOnce == true)
        {
            var clawTarget = GetComponent <ClawTarget>();
            clawTarget.SetLightsVisible(DoOnce != DoneOnce || DoOnce == false);
        }
    }
Exemplo n.º 3
0
 protected void Awake()
 {
     if (instance != null)
     {
         GameObject.Destroy(this);
         return;
     }
     else
     {
         instance = this;
         GameObject.DontDestroyOnLoad(this);
     }
 }
Exemplo n.º 4
0
    public void Add()
    {
        if (DoOnce == true && DoOnce == DoneOnce)
            return;

        if (DoOnce == true)
        {
            JunkerGameMode.FinishedStoryPart(EventChain.name);

            DoneOnce = true;
        }

        if (EventChain != null)
            foreach (GameEvent item in EventChain.eventChain)
            {
                EventManager.AddEvent(item);
            }
    }
Exemplo n.º 5
0
 private void Awake()
 {
     if (!JunkerGameMode.HasDoneStoryPart(EventChain.name))
         Add();
 }