Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        cursorDelaySeq = action.Sequence();
        FFMessageBoard <UnBlockUseArea> .Connect(OnUnBlockUseArea, gameObject);

        FFMessageBoard <BlockUseArea> .Connect(OnBlockUseArea, gameObject);
    }
Exemplo n.º 2
0
    void SetupOnRope()
    {
        SetVelocityRef(new FFRef <Vector3>(
                           () => OnRope.rope.VelocityAtDistUpRope(OnRope.distUpRope),
                           (v) => {}));

        FFMessageBoard <RopeChange> .Connect(OnRopeChange, OnRope.rope.gameObject);
    }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        FFMessageBoard <GiveCoins> .Connect(OnGiveCoin, gameObject);

        FFMessageBoard <GiveObject> .Connect(OnGiveObject, gameObject);

        UpdateUI();
    }
Exemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        FFMessageBoard <UseBegin> .Connect(OnUseBegin, gameObject);

        FFMessageBoard <Using> .Connect(OnUsing, gameObject);

        FFMessageBoard <QueryUsable> .Connect(OnQueryUsable, gameObject);
    }
Exemplo n.º 5
0
    // Use this for initialization
    void Start()
    {
        FFMessageBoard <ConfigurePopup> .Connect(OnConfiurePopup, gameObject);

        FFMessageBoard <PlayerInteract.LookingAt> .Connect(OnLookAt, gameObject);

        FFMessageBoard <PlayerInteract.LookingAway> .Connect(OnLookAway, gameObject);

        FFMessageBoard <PlayerInteract.Looking> .Connect(OnLooking, gameObject);

        FFMessageBoard <PlayerInteract.Use> .Connect(OnUse, gameObject);
    }
Exemplo n.º 6
0
    void Awake()
    {
        foreach (var group in damageGroups)
        {
            damageGroup |= group;
        }

        FFSystem.RegisterNetGameObject(gameObject, gameObject.name);
        FFMessageBoard <ApplyHealthEvent> .Connect(OnApplyHealth, gameObject);

        FFMessageBoard <EmptyHealthEvent> .Connect(OnHealthEmpty, gameObject);

        if (FFServer.isLocal == false)
        {
            FFMessageBoard <ExHealth> .Connect(OnServerUpdate, gameObject);
        }
        else
        {
            FFMessage <FFNetEvents.ClientConnectedEvent> .Connect(OnClientConnected);
        }
    }
Exemplo n.º 7
0
    void Awake()
    {
        bool localNetObject = FFSystem.RegisterNetGameObject(gameObject, "Player");

        // Make Sequences
        MoveSeq = action.Sequence();
        // Update Sequence

        // Input Events only if object was created by local source
        if (localNetObject)
        {
            FFMessage <FFLocalEvents.UpdateEvent> .Connect(OnUpdateEvent);

            PositionUpdateSeq = action.Sequence();
            PositionUpdateSeq.Call(UpdatePositionCall);
        }

        FFMessageBoard <ExPlayerPositionUpdate> .Connect(OnPlayerPositionUpdate, gameObject);

        FFMessageBoard <ExPlayerMoveAction> .Connect(OnPlayerMoveAction, gameObject);

        FFMessageBoard <ExPlayerFireAction> .Connect(OnPlayerFireAction, gameObject);
    }
Exemplo n.º 8
0
 void Start()
 {
     FFMessageBoard <PlayerInteract.Use> .Connect(OnUse, gameObject);
 }
Exemplo n.º 9
0
 // Use this for initialization
 void Start()
 {
     fadeSeq = action.Sequence();
     FFMessageBoard <ActivateUsableObject> .Connect(OnActivate, gameObject);
 }
Exemplo n.º 10
0
    // Better design pattern than ExEnemy1 which is far more scalable/easy. Also anything
    // as in other controlers can tie into this event when needed. This allows your sound
    // /animation/etc... controllers to connect to anything it needs related to an event
    // on this gameobject
    void Awake()
    {
        FFMessageBoard <ActivateEnemiesEvent> .Connect(activate, gameObject);

        FFMessageBoard <DeactivateEnemiesEvent> .Connect(deactivate, gameObject);
    }
Exemplo n.º 11
0
    // Use this for initialization
    void Start()
    {
        rigid = GetComponent <Rigidbody2D>();

        FFMessageBoard <UseCompleted> .Connect(OnUseCompleted, gameObject);
    }
Exemplo n.º 12
0
 // Use this for initialization
 void Start()
 {
     FFMessageBoard <ActivateUsableObject> .Connect(OnActivate, gameObject);
 }