From fd4f77ee3621bef2ce91ee6584ca9a2dc5064f96 Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 17 Oct 2020 21:41:56 +0800 Subject: =?UTF-8?q?*=E7=A7=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AbilitySystem/Actions/ActionDontUseGravity.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'Assets/Scripts/AbilitySystem/Actions/ActionDontUseGravity.cs') diff --git a/Assets/Scripts/AbilitySystem/Actions/ActionDontUseGravity.cs b/Assets/Scripts/AbilitySystem/Actions/ActionDontUseGravity.cs index 1c27a487..82b176fd 100644 --- a/Assets/Scripts/AbilitySystem/Actions/ActionDontUseGravity.cs +++ b/Assets/Scripts/AbilitySystem/Actions/ActionDontUseGravity.cs @@ -2,17 +2,17 @@ using System.Collections.Generic; using UnityEngine; -public class ActionDontUseGravity : MonoBehaviour +public class ActionDontUseGravity : ActionBase { - // Start is called before the first frame update - void Start() - { - - } + PhysicsBody m_Body; - // Update is called once per frame - void Update() - { - - } + public ActionDontUseGravity(PhysicsBody body) + { + m_Body = body; + } + + public override void Execute() + { + m_Body.UseGravity = false; + } } -- cgit v1.1-26-g67d0