示例#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> ();
    }
示例#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;
    }
示例#3
0
 public void Leave()
 {
     StatMini.GetMiniContainer(transform).GetComponent <MiniInput>().FreeInput();
 }
示例#4
0
 public void Enter(MainInput pass)
 {
     StatMini.GetMiniContainer(transform).GetComponent <MiniInput>().SetInput(pass);
 }