コード例 #1
0
ファイル: PlayerScript.cs プロジェクト: naumazeredo/LD29
    void Start()
    {
        rebind = RebindData.GetRebindManager();
        unit = GetComponent<UnitScript>();
        anim = GetComponent<Animator>();

        //unit.OnDeath = OnDeath;
        unit.OnDeath = HUDScript.instance.OnPlayerDeath;
    }
コード例 #2
0
    void Start()
    {
        rebind = RebindData.GetRebindManager();
        unit   = GetComponent <UnitScript>();
        anim   = GetComponent <Animator>();

        //unit.OnDeath = OnDeath;
        unit.OnDeath = HUDScript.instance.OnPlayerDeath;
    }
コード例 #3
0
ファイル: HUDScript.cs プロジェクト: naumazeredo/LD29
    void Start()
    {
        rebind = RebindData.GetRebindManager();

        for (int i = 0; i < playing.Length; ++i)
          playing[i].gameObject.SetActive(true);

        for (int i = 0; i < dead.Length; ++i)
          dead[i].gameObject.SetActive(false);

        playerAlive = true;
    }
コード例 #4
0
    // Techniques
    // Use this for initialization
    void Start()
    {
        // Rebinding
        keys = RebindData.GetRebindManager();

        // Weapon
        weapon.PickUpWeapon(this);

        // Get Basic Skills
        skill = new SkillScript[skillCount];
        skill[0] = GetComponent<JumpSkillScript>();
        skill[1] = GetComponent<DashSkillScript>();
    }
コード例 #5
0
    // Techniques


    // Use this for initialization
    void Start()
    {
        // Rebinding
        keys = RebindData.GetRebindManager();

        // Weapon
        weapon.PickUpWeapon(this);

        // Get Basic Skills
        skill    = new SkillScript[skillCount];
        skill[0] = GetComponent <JumpSkillScript>();
        skill[1] = GetComponent <DashSkillScript>();
    }
コード例 #6
0
    void Start()
    {
        rebind = RebindData.GetRebindManager();

        for (int i = 0; i < playing.Length; ++i)
        {
            playing[i].gameObject.SetActive(true);
        }

        for (int i = 0; i < dead.Length; ++i)
        {
            dead[i].gameObject.SetActive(false);
        }

        playerAlive = true;
    }
コード例 #7
0
    // Use this for initialization
    void Start()
    {
        // Player
        player = GetComponent <PlayerScript>();

        // Rebinding
        keys = RebindData.GetRebindManager();

        // Rope
        groundCollider = GetComponent <BoxCollider2D>();

        // Jetpack
        jetEmitter = transform.FindChild("Jetpack").GetComponent <ParticleSystem>();

        // Collision
        BoxCollider2D box = GetComponent <BoxCollider2D>();
        Vector2       center = box.center, size = box.size;

        colDL = transform.FindChild("collision").FindChild("dl").transform;
        colDM = transform.FindChild("collision").FindChild("dm").transform;
        colDR = transform.FindChild("collision").FindChild("dr").transform;
        colML = transform.FindChild("collision").FindChild("ml").transform;
        colMR = transform.FindChild("collision").FindChild("mr").transform;
        colUL = transform.FindChild("collision").FindChild("ul").transform;
        colUM = transform.FindChild("collision").FindChild("um").transform;
        colUR = transform.FindChild("collision").FindChild("ur").transform;

        colDL.localPosition = center + new Vector2(-size.x / 2f, -size.y / 2f);
        colDM.localPosition = center + new Vector2(0f, -size.y / 2f);
        colDR.localPosition = center + new Vector2(size.x / 2f, -size.y / 2f);
        colML.localPosition = center + new Vector2(-size.x / 2f, 0f);
        colMR.localPosition = center + new Vector2(size.x / 2f, 0f);
        colUL.localPosition = center + new Vector2(-size.x / 2f, size.y / 2f);
        colUM.localPosition = center + new Vector2(0f, size.y / 2f);
        colUR.localPosition = center + new Vector2(size.x / 2f, size.y / 2f);
    }
コード例 #8
0
    // Use this for initialization
    void Start()
    {
        // Player
        player = GetComponent<PlayerScript>();

        // Rebinding
        keys = RebindData.GetRebindManager();

        // Rope
        groundCollider = GetComponent<BoxCollider2D>();

        // Jetpack
        jetEmitter = transform.FindChild("Jetpack").GetComponent<ParticleSystem>();

        // Collision
        BoxCollider2D box = GetComponent<BoxCollider2D>();
        Vector2 center = box.center, size = box.size;
        colDL = transform.FindChild("collision").FindChild("dl").transform;
        colDM = transform.FindChild("collision").FindChild("dm").transform;
        colDR = transform.FindChild("collision").FindChild("dr").transform;
        colML = transform.FindChild("collision").FindChild("ml").transform;
        colMR = transform.FindChild("collision").FindChild("mr").transform;
        colUL = transform.FindChild("collision").FindChild("ul").transform;
        colUM = transform.FindChild("collision").FindChild("um").transform;
        colUR = transform.FindChild("collision").FindChild("ur").transform;

        colDL.localPosition = center + new Vector2(-size.x / 2f, -size.y / 2f);
        colDM.localPosition = center + new Vector2(0f, -size.y / 2f);
        colDR.localPosition = center + new Vector2(size.x / 2f, -size.y / 2f);
        colML.localPosition = center + new Vector2(-size.x / 2f, 0f);
        colMR.localPosition = center + new Vector2(size.x / 2f, 0f);
        colUL.localPosition = center + new Vector2(-size.x / 2f, size.y / 2f);
        colUM.localPosition = center + new Vector2(0f, size.y / 2f);
        colUR.localPosition = center + new Vector2(size.x / 2f, size.y / 2f);
    }
コード例 #9
0
ファイル: RebindMenu.cs プロジェクト: naumazeredo/SideShooter
 void Start()
 {
     rebindData = RebindData.GetRebindManager();
     rebindKeys = rebindData.GetCurrentKeys();
 }
コード例 #10
0
 void Start()
 {
     rebindData = RebindData.GetRebindManager();
     rebindKeys = rebindData.GetCurrentKeys();
 }