コード例 #1
0
    public override void ActOnce(StateController controller)
    {
        GargoyleData data = (GargoyleData)controller.data;

        data.SetPlatformEffector(false);
        data.rb.constraints           = RigidbodyConstraints2D.FreezeRotation;
        data.gameObject.layer         = 11; // Enemy
        data.playerDamageData.harmful = true;

        data.rb.velocity = data.velocityBeforeFrozen;
    }
コード例 #2
0
    public override void ActOnce(StateController controller)
    {
        GargoyleData data = (GargoyleData)controller.data;

        data.velocityBeforeFrozen = data.rb.velocity;

        data.rb.constraints           = RigidbodyConstraints2D.FreezeAll;
        data.gameObject.layer         = 8; // Blockable
        data.playerDamageData.harmful = false;
        data.SetPlatformEffector(true);
    }