Example #1
0
    // Use this for initialization
    void Awake()
    {
        pCommon  = GetComponent <TwoCommon> ();
        tCol     = GetComponent <TwoColSquare> ();
        tColPhys = GetComponent <TwoColPhysics> ();

        pGravity = GetComponent <PlatGravity> ();
        pRamp    = GetComponent <PlatPhysRamp> ();

        pGlobal = StatMini.GetMiniContainer(transform).GetComponent <TwoGlobal> ();

        input = StatMini.GetMiniContainer(transform).GetComponent <MiniInput> ();
    }
Example #2
0
    // Use this for initialization
    void Awake()
    {
        // Establish a link to global statistics.
        global = StatMini.GetMiniContainer(transform).GetComponent <Global2D> ();
        input  = StatMini.GetMiniContainer(transform).GetComponent <MiniInput> ();

        // Be sure our custom (not on the grid) location is recorded at the start.
        pos = new Vector2(transform.position.x / StatMini.PIXEL_SIZE,
                          transform.position.y / StatMini.PIXEL_SIZE);

        // Set the layer mask we're using.
        layerMask = 1 << layer;
    }