This repository is forked from Boat Attack and converted Unity editor version to China edition: 2019.4.28f1c1(and above versions) to enable Auto-Streaming capability.
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

17 行
443 B

using System;
using UnityEngine;
namespace BoatAttack
{
public class BaseController : MonoBehaviour
{
[NonSerialized] protected Boat controller; // the boat controller
[NonSerialized] protected Engine engine; // the engine script
public virtual void OnEnable()
{
if(TryGetComponent(out controller)) // get the controller script
engine = controller.engine;
}
}
}