示例#1
0
文件: Goal.cs 项目: douglasZwick/blb
    void Activate(GoalActivator activator)
    {
        m_Activated = true;

        var eventData = new GoalEventData()
        {
            m_Goal      = this,
            m_Activator = activator,
        };

        activator.Activated(eventData);
        m_Events.GoalActivated.Invoke(eventData);
    }
    public void OnActivatedGoal(GoalEventData eventData)
    {
        if (!gameObject.activeInHierarchy)
        {
            return;
        }

        var spawnPosition = m_Transform.position;
        var spawnRotation = m_Transform.rotation;

        m_Sequence = Instantiate(m_SequencePrefab, spawnPosition, spawnRotation);
        m_Sequence.m_EyesController.m_LookAngle = m_EyesController.m_LookAngle;

        m_Sequence.Begin();

        gameObject.SetActive(false);
    }
示例#3
0
 public void OnActivatedGoal(GoalEventData eventData)
 {
     GlobalData.DisablePlayMode();
 }
示例#4
0
    public void Activated(GoalEventData eventData)
    {
        m_Events.ActivatedGoal.Invoke(eventData);

        enabled = false;
    }