예제 #1
0
파일: Piece.cs 프로젝트: Xelager/Chess
 private void Awake()
 {
     avaliableMoves = new List <Vector2Int>();
     tweener        = GetComponent <IObjectTweener>();
     materialSetter = GetComponent <MaterialSetter>();
     hasMoved       = false;
 }
예제 #2
0
 public void SetMaterial(Material material)
 {
     if (materialSetter == null)
     {
         materialSetter = GetComponent <MaterialSetter>();
     }
     materialSetter.SetSingleMaterial(material);
 }
예제 #3
0
 private void Awake()
 {
     availableMoves = new List <Vector2Int>();
     tweener        = GetComponent <IObjectTweener>();
     materialSetter = GetComponent <MaterialSetter>();
     audioOutput    = GetComponent <AudioOutputController>();
     hasMoved       = false;
 }
예제 #4
0
    void SetCurrentPrefab()
    {
        currentTree = ObjectChanger.SetCurrentPrefab(trees, currentTree, transform, out treeProperties.currentMonthStart);
        currentTree.transform.parent = parent;
        MaterialSetter materialSetter = currentTree.GetComponent <MaterialSetter> ();

        if (materialSetter != null)
        {
            materialSetter.SetTreePropertyValues(treeProperties);
        }
    }
예제 #5
0
 private void Awake()
 {
     motor          = GetComponent <Motor>();
     materialSetter = GetComponent <MaterialSetter>();
     hitEffect      = GetComponent <IHitable>();
 }