Stardog

Unity 5 - Programming - Interfaces - Alternatives #1

Apr 6th, 2015
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public interface IBark
  5. {
  6.     void Bark();
  7. }
  8.  
  9. public class Example : Monobehaviour, IBark {
  10.  
  11.     // Implementation of IBark
  12.     void Bark()
  13.     {
  14.         GetComponent<BarkScript>().Bark();
  15.     }
  16.  
  17. }
Add Comment
Please, Sign In to add comment