public Stuff(GameObject obj) { StuffObj = obj; Controller = StuffObj.GetComponent <hasSpeed>(); if (Controller == null) { throw new System.InvalidOperationException("Object has no 'hasSpeed object'"); } StartSpeed = Controller.GetStartMoveSpeed(); }
public Stuff(hasSpeed temp) { Controller = temp; StartSpeed = Controller.GetStartMoveSpeed(); }