コード例 #1
0
    protected override void Start()
    {
        base.Start();

        i     = positions.Length - 1;
        tempI = 0;

        translatedPositions = new Vector2[positions.Length];

        if (positions.Length > 0)
        {
            Translate();
        }

        SlimePath spReference;

        spReference         = gameObject.GetComponent <SlimePath> ();
        spReference.enabled = true;
    }
コード例 #2
0
ファイル: SlimeHandler.cs プロジェクト: Nachtrind/Fungus
 public void AddConnection(SlimePath path)
 {
     if (smooth) {
         switch (pathSmoother.smoothType) {
         default:
             path.ApplySmoother (pathSmoother.SmoothSimple);
             break;
         case SimpleSmoothModifier.SmoothType.Bezier:
             path.ApplySmoother (pathSmoother.SmoothBezier);
             break;
         case SimpleSmoothModifier.SmoothType.OffsetSimple:
             path.ApplySmoother (pathSmoother.SmoothOffsetSimple);
             break;
         case SimpleSmoothModifier.SmoothType.CurvedNonuniform:
             path.ApplySmoother (pathSmoother.CurvedNonuniform);
             break;
         }
     }
     slimePaths.Add (path);
 }