コード例 #1
0
    void getAbilities()
    {
        try
        { basicMoveMent = this.GetComponentInChildren <IBasicMoveMent>();
          basicMoveMent.enableAbility(this);
          basicMoveMent.activate(); }
        catch
        {
        }
        try
        {
            rotateArm = this.GetComponentInChildren <IRotateArm>();
            rotateArm.enableAbility(this);
            rotateArm.deactivate();
        }
        catch
        {
        }

        try
        {
            grapple = armController.GetComponentInChildren <IGrapple>();
            grapple.enableAbility(this);
        }
        catch
        {
        }
        try
        {
            landHit = this.GetComponentInChildren <ILandHit>();
        }
        catch
        {
        }
        try
        {
            slimeArm = armController.GetComponent <ISlimeArm>();
            slimeArm.enableAbility(this);
            Debug.Log(slimeArm);
        }
        catch
        {
            Debug.LogError("No SlimeArm");
        }
        try
        {
            teleporte = this.GetComponentInChildren <ITeleporte>();
        }
        catch
        {
        }

        try
        {
            chargeArm = this.GetComponentInChildren <IChargeArm>();
        }
        catch
        {
        }
    }
コード例 #2
0
 public void enableAbility(CenterController centerController)
 {
     _isEnable             = true;
     rotateArm             = centerController.getRotateArm();
     armController         = centerController.getArmController();
     this.centerController = centerController;
 }